remm 01/09/10 10:42:51
Modified: catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
Log:
- Apparently the URL class loader is not thread safe, so sync the call to the
superclass must be synced :-(
- Class loader gurus, please review (if no syncing is needed, let me know) :)
- Should fix bug 3518.
Revision Changes Path
1.24 +7 -5
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
Index: StandardClassLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- StandardClassLoader.java 2001/08/15 01:47:01 1.23
+++ StandardClassLoader.java 2001/09/10 17:42:50 1.24
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
1.23 2001/08/15 01:47:01 craigmcc Exp $
- * $Revision: 1.23 $
- * $Date: 2001/08/15 01:47:01 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
1.24 2001/09/10 17:42:50 remm Exp $
+ * $Revision: 1.24 $
+ * $Date: 2001/09/10 17:42:50 $
*
* ====================================================================
*
@@ -112,7 +112,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Revision: 1.23 $ $Date: 2001/08/15 01:47:01 $
+ * @version $Revision: 1.24 $ $Date: 2001/09/10 17:42:50 $
*/
public class StandardClassLoader
@@ -667,7 +667,9 @@
if (debug >= 4)
log(" super.findClass(" + name + ")");
try {
- clazz = super.findClass(name);
+ synchronized (this) {
+ clazz = super.findClass(name);
+ }
} catch(AccessControlException ace) {
throw new ClassNotFoundException(name);
} catch (RuntimeException e) {