code: @Override
      public void contextDestroyed(ServletContextEvent event) {
          // deregister database drivers
          try {
              for (Enumeration<Driver> e = DriverManager.getDrivers(); e
                      .hasMoreElements();) {
                  Driver driver = e.nextElement();
                  if (driver.getClass().getClassLoader() == getClass()
                          .getClassLoader()) {
                      DriverManager.deregisterDriver(driver);
                  }
              }
          } catch (Throwable e) {
              // Any errors thrown in clearing the caches aren't significant to
              // the normal execution of the application, so we ignore them
          }
          // Clean the axis method cache, see FCREPO-496
  //        org.apache.axis.utils.cache.MethodCache.getInstance().clearCache();
      }
docs: Clean up resources used by the application when stopped
  
  @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet
  .ServletContextEvent)