bobpaulin commented on code in PR #10692:
URL: https://github.com/apache/nifi/pull/10692#discussion_r2649227310
##########
nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java:
##########
@@ -213,6 +217,8 @@ public class HikariCPConnectionPool extends
AbstractControllerService implements
private volatile HikariDataSource dataSource;
private volatile KerberosUser kerberosUser;
+ // Hold an instance of the driver so we can properly de-register it.
+ private volatile Driver registeredDriver;
Review Comment:
I do think there are multiple ways to do this. I personally like holding a
reference because the method signature of DriverManager.deregister is looking
for the driver object not the class or classname so removal is very fast and
obvious in the code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]