-
Bug
-
Resolution: Obsolete
-
Major
-
JBossAS-4.0.5.GA
-
None
org.jboss.net.protocol.URLStreamHandlerFactory uses the thread context class loader. Any two class loaders that recurse into a parent URLClassLoader that need to initialize the protocol handlers for its classpath can end up with recursion back to the child and deadlock.
Change our URLStreamHandlerFactory to only use Class.forName to restrict class loading to its class loader or its parent. That would require all handlers to be present in the jboss bootstrap or system class loader. That is not a huge restriction given that the java.net.URL class has a static cache of the handlers. The URLClassLoader does support a per instance URLStreamHandlerFactory needed per application protocol handlers, but we would have to change the tomcat class loader to support this.