Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[CONJ-779] stop() correction of OSGi bundle activator
  • Loading branch information
rusher committed Apr 15, 2020
1 parent 01c53cb commit f0e4180
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -52,6 +52,7 @@
package org.mariadb.jdbc.internal.osgi;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Dictionary;
import java.util.Hashtable;
import org.mariadb.jdbc.Driver;
Expand Down Expand Up @@ -86,9 +87,11 @@ public void stop(BundleContext context) throws Exception {
service.unregister();
service = null;
}

if (DriverManager.getDriver("jdbc:mariadb:") != null) {
try {
DriverManager.getDriver("jdbc:mariadb:");
SchedulerServiceProviderHolder.close();
} catch (SQLException sqle) {
// eat "No suitable driver"
}
}
}

0 comments on commit f0e4180

Please sign in to comment.