Revert simple ResourceBundle fix
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 11 Feb 2010 16:55:26 +0000 (16:55 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 11 Feb 2010 16:55:26 +0000 (16:55 +0000)
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

java/org/apache/catalina/loader/WebappClassLoader.java
java/org/apache/jasper/servlet/JspServletWrapper.java

index d74cded..e9adf34 100644 (file)
@@ -47,7 +47,6 @@ import java.util.Iterator;
 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;
@@ -1774,9 +1773,6 @@ public class WebappClassLoader
             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();
 
index e153ccc..be7d227 100644 (file)
@@ -20,7 +20,6 @@ package org.apache.jasper.servlet;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.URL;
-import java.util.ResourceBundle;
 
 import javax.servlet.Servlet;
 import javax.servlet.ServletConfig;
@@ -417,9 +416,6 @@ public class JspServletWrapper {
 
     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 {