You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java
// Ensure drivers that register themselves during class loading can be set as the registeredDriver.
267
+
// This ensures drivers that register themselves can be deregisterd when the componet is removed.
268
+
if (driver != registeredDriver) {
269
+
DriverManager.deregisterDriver(registeredDriver);
270
+
271
+
registeredDriver = driver;
272
+
if (!registeredDriver.getClass().getClassLoader().equals(getClass().getClassLoader())) {
273
+
getLogger().warn("Registered Driver created in a different ClassLoader [{}]. Driver will become unavailable when it is deregisterd.", registeredDriver);
274
+
}
275
+
}
276
+
returndriver;
267
277
} catch (finalSQLExceptione) {
268
278
// In case the driver is not registered by the implementation, we explicitly try to register it.
0 commit comments