aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/CrosspostComponent.java20
-rw-r--r--src/main/java/com/juick/PushComponent.java20
-rw-r--r--src/main/java/com/juick/xmpp/s2s/XMPPComponent.java20
3 files changed, 0 insertions, 60 deletions
diff --git a/src/main/java/com/juick/CrosspostComponent.java b/src/main/java/com/juick/CrosspostComponent.java
index d7ee8724..eb4e2207 100644
--- a/src/main/java/com/juick/CrosspostComponent.java
+++ b/src/main/java/com/juick/CrosspostComponent.java
@@ -92,26 +92,6 @@ public class CrosspostComponent implements ServletContextListener, Stream.Strea
@Override
public void contextDestroyed(ServletContextEvent sce) {
- // 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");
}
diff --git a/src/main/java/com/juick/PushComponent.java b/src/main/java/com/juick/PushComponent.java
index e33d5fc3..d8401e51 100644
--- a/src/main/java/com/juick/PushComponent.java
+++ b/src/main/java/com/juick/PushComponent.java
@@ -107,26 +107,6 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
@Override
public void contextDestroyed(ServletContextEvent sce) {
- // 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");
}
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");
}