Ejemplo n.º 1
0
 public void internalDestroy() {
   try {
     if (!stopped) {
       try {
         internalStop();
       } catch (final LifecycleException e) {
         // no-op
       }
     }
     super.destroy();
   } finally {
     cleanUpClassLoader();
   }
 }
Ejemplo n.º 2
0
 public void internalStop() throws LifecycleException {
   if (stopped) {
     return;
   }
   // reset classloader because of tomcat classloaderlogmanager
   // to be sure we reset the right loggers
   final Thread thread = Thread.currentThread();
   final ClassLoader loader = thread.getContextClassLoader();
   thread.setContextClassLoader(this);
   try {
     super.stop();
     // super.destroy();
     if (webResourceRoot != null) {
       webResourceRoot.internalStop();
       webResourceRoot = null;
     }
     stopped = true;
   } finally {
     thread.setContextClassLoader(loader);
     if (!forceStopPhase) {
       cleanUpClassLoader();
     }
   }
 }