remm 2005/09/08 08:00:57
Modified: catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
webapps/docs changelog.xml
util/java/org/apache/tomcat/util IntrospectionUtils.java
Log:
- 36558: Clear introspection utils cache, which could leak a reference to the
webapp classloader.
Revision Changes Path
1.50 +4 -1
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Index: WebappClassLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- WebappClassLoader.java 4 May 2005 07:30:24 -0000 1.49
+++ WebappClassLoader.java 8 Sep 2005 15:00:54 -0000 1.50
@@ -56,6 +56,7 @@
import org.apache.naming.JndiPermission;
import org.apache.naming.resources.Resource;
import org.apache.naming.resources.ResourceAttributes;
+import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.compat.JdkCompat;
/**
@@ -1514,6 +1515,8 @@
org.apache.commons.logging.LogFactory.release(this);
// Clear the classloader reference in the VM's bean introspector
java.beans.Introspector.flushCaches();
+ // Clear the IntrospectionUtils cache
+ IntrospectionUtils.clear();
}
1.370 +4 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml
Index: changelog.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
retrieving revision 1.369
retrieving revision 1.370
diff -u -r1.369 -r1.370
--- changelog.xml 8 Sep 2005 10:45:14 -0000 1.369
+++ changelog.xml 8 Sep 2005 15:00:54 -0000 1.370
@@ -52,6 +52,10 @@
<fix>
<bug>36534</bug>: fix equals for URLs returned by
ServletContext.getResource() (luehe)
</fix>
+ <fix>
+ <bug>36558</bug>: Clear IntrospectionUtils cache when stopping a
webapp, as it
+ could leak to keeping a reference to the classloader (remm)
+ </fix>
</changelog>
</subsection>
1.16 +4 -0
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java
Index: IntrospectionUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- IntrospectionUtils.java 26 Jun 2005 21:19:28 -0000 1.15
+++ IntrospectionUtils.java 8 Sep 2005 15:00:55 -0000 1.16
@@ -757,6 +757,10 @@
}
// -------------------- other utils --------------------
+ public static void clear() {
+ objectMethods.clear();
+ }
+
public static String[] findVoidSetters(Class c) {
Method m[] = findMethods(c);
if (m == null)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]