jtstorck commented on a change in pull request #3288: [WIP] NIFI-5985: Added
capability for DBCPConnectionPool to use KerberosCre…
URL: https://github.com/apache/nifi/pull/3288#discussion_r254963704
##########
File path:
nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java
##########
@@ -413,6 +437,15 @@ protected ClassLoader getDriverClassLoader(String
locationString, String drvName
*/
@OnDisabled
public void shutdown() {
+ try {
Review comment:
Good point. I moved the logout so that it happens after the datasource is
closed. However, I'm not certain that we want to throw exceptions if either of
those operations fail. If an exception is thrown, it will prevent the
controller service from stopping, right? I checked the HiveaConnectionPool's
`@OnDisabled` method, which throws an exception if the datasource can't be
closed, but some other controller services log the exception and allow the
method to complete, which would allow the service to stop.
What are your thoughts on doing that with the DBCPConnectionPool? If we
allow the `@OnDisabled` method to complete even after an exception, the next
time the controller services is started, the member variables should be
overwritten and eventually garbage collected (or we could set them all to null
before the method finishes), but I'm not sure we want to rely on that.
It seems worth thinking about, because we don't want to prevent the service
from stopping without a way to stop it eventually, without restarting NiFi.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services