Change URLStreamHandlerFactory to only use Class.forName
--------------------------------------------------------
Key: JBAS-5494
URL:
http://jira.jboss.com/jira/browse/JBAS-5494
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ClassLoading
Affects Versions: JBossAS-4.0.5.GA
Reporter: Mike Millson
Assigned To: Scott M Stark
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira