On reflection (no pun intended) a reflection based will be better since
- it can be implemented at a single point
- it can easily be ported to Tomcat 6
- it will be able to handle any exotic class loader structures created by apps
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@909072
13f79535-47bb-0310-9956-
ffa450edef68
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Vector;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.jar.Attributes;
org.apache.juli.logging.LogFactory.release(this);
}
- // Clear any cached resource bundles
- ResourceBundle.clearCache(this);
-
// Clear the classloader reference in the VM's bean introspector
java.beans.Introspector.flushCaches();
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
-import java.util.ResourceBundle;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
public void destroy() {
if (theServlet != null) {
- // Memory leak prevention - ResourceBundle caches resources based
- // on class loader
- ResourceBundle.clearCache(ctxt.getJspLoader());
theServlet.destroy();
InstanceManager instanceManager = InstanceManagerFactory.getInstanceManager(config);
try {