/** * Unbind thread. */ protected void unbindThread(ClassLoader oldContextClassLoader) { Thread.currentThread().setContextClassLoader(oldContextClassLoader); oldContextClassLoader = null; DirContextURLStreamHandler.unbind(); }
public void doStop() throws Exception { statsProvider = null; container.removeContext(this); DirContextURLStreamHandler.unbind(classLoader); // No more logging will occur for this ClassLoader. Inform the LogFactory to avoid a memory leak. // LogFactory.release(classLoader); log.debug("TomcatWebAppContext stopped"); }
public void doStop() throws Exception { container.removeContext(this); DirContextURLStreamHandler.unbind(classLoader); // No more logging will occur for this ClassLoader. Inform the LogFactory to avoid a memory leak. // LogFactory.release(classLoader); log.debug("TomcatWebAppContext stopped"); }
/** * Unbind thread. */ private void unbindThread(ClassLoader oldContextClassLoader) { Thread.currentThread().setContextClassLoader(oldContextClassLoader); oldContextClassLoader = null; if (isUseNaming()) { ContextBindings.unbindThread(this, this); } DirContextURLStreamHandler.unbind(); }
public void stop() throws LifecycleException { // Remove the ctxLoader mapping kept by the DirContextURLStreamHandler DirContextURLStreamHandler.unbind(ctxLoader); org.apache.commons.logging.LogFactory.release(ctxLoader); org.apache.commons.logging.LogFactory.release(encLoader); this.encLoader = null; this.ctxLoader = null; this.repositories.clear(); this.warURL = null; this.webContainer = null; }
/** * Stop this component, finalizing our associated class loader. * * @exception LifecycleException if a lifecycle error occurs */ public void stop() throws LifecycleException { // Validate and update our current component state if (!started) throw new LifecycleException (rb.getString(LogFacade.LOADER_NOT_STARTED_EXCEPTION)); if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, "Stopping this Loader"); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; // Remove context attributes as appropriate if (container instanceof Context) { ServletContext servletContext = ((Context) container).getServletContext(); servletContext.removeAttribute(Globals.CLASS_PATH_ATTR); } // Throw away our current class loader stopNestedClassLoader(); DirContextURLStreamHandler.unbind(classLoader); classLoader = null; destroy(); }
DirContextURLStreamHandler.unbind(this);
DirContextURLStreamHandler.unbind((ClassLoader) classLoader);
DirContextURLStreamHandler.unbind(classLoader);
DirContextURLStreamHandler.unbind(classLoader);
DirContextURLStreamHandler.unbind(classLoader);
DirContextURLStreamHandler.unbind(classLoader);
DirContextURLStreamHandler.unbind(classLoader);
DirContextURLStreamHandler.unbind(loader.getClassLoader());