You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/02/08 20:50:40 UTC

[GitHub] markap14 commented on a change in pull request #3288: [WIP] NIFI-5985: Added capability for DBCPConnectionPool to use KerberosCre…

markap14 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_r255231061
 
 

 ##########
 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:
   I would probably recommend using a `try/finally` to ensure that we do both. It's okay to throw an Exception from a method with `@OnDisabled` - from the docs:
   ```
   If a method with this annotation throws a Throwable, a log message and
   bulletin will be issued for the service, but the service will still be marked as Disabled.
   The failing method will not be called again until the service is enabled and disabled again.
   This is done in order to prevent a ControllerService from continually failing
   in such a way that the service could not be disabled and updated without
   restarting the instance of 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:
users@infra.apache.org


With regards,
Apache Git Services