aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-06 19:51:55 +0300
committerGravatar Vitaly Takmazov2016-07-06 19:51:55 +0300
commit8c8200933f01074b001b0f0f5bf7113ed6e29de6 (patch)
treec2b9dbad7a34ba9d2b4443fa1cd0be19a6043fbd /src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
parent889fc20d622871c61877d9991a7147c748d702fb (diff)
cleanup
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/XMPPComponent.java')
-rw-r--r--src/main/java/com/juick/xmpp/s2s/XMPPComponent.java20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java b/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
index 8ebdb76a..ecfe1671 100644
--- a/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
+++ b/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
@@ -232,26 +232,6 @@ public class XMPPComponent implements ServletContextListener {
} catch (IOException e) {
LOGGER.log(Level.WARNING, "router warning", e);
}
- // Now deregister JDBC drivers in this context's ClassLoader:
- // Get the webapp's ClassLoader
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- // Loop through all drivers
- Enumeration<Driver> drivers = DriverManager.getDrivers();
- while (drivers.hasMoreElements()) {
- Driver driver = drivers.nextElement();
- if (driver.getClass().getClassLoader() == cl) {
- // This driver was registered by the webapp's ClassLoader, so deregister it:
- try {
- LOGGER.info(String.format("Deregistering JDBC driver %s", driver.toString()));
- DriverManager.deregisterDriver(driver);
- } catch (SQLException ex) {
- LOGGER.log(Level.SEVERE, String.format("Error deregistering JDBC driver %s", driver), ex);
- }
- } else {
- // driver was not registered by the webapp's ClassLoader and may be in use elsewhere
- LOGGER.log(Level.SEVERE, String.format("Not deregistering JDBC driver %s as it does not belong to this webapp's ClassLoader", driver));
- }
- }
executorService.shutdown();
LOGGER.info("component destroyed");
}