Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5494

Change URLStreamHandlerFactory to only use Class.forName

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-4.0.5.GA
    • ClassLoading
    • 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.

              starksm64 Scott Stark (Inactive)
              rhn-support-mmillson Michael Millson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: