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

Expose org.jboss.net.protocol.URLStreamHandlerFactory as a service provider for java.net.URLStreamHandlerFactory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • No Release
    • None
    • None
    • None
    • Low

      In JBoss AS7 each module uses ModularURLStreamHandlerFactory as the implementation for URLStreamHandlerFactory, which actually goes through the set of modules ( provided using jboss.protocol.handler.modules system property ) and locates all URLStreamHandlerFactory providers for the given module ( that are used to create URLStreamHandler ).
      org.jboss.net.protocol.URLStreamHandlerFactory is a service provider for java.net.URLStreamHandlerFactory, it is shipped with org.jboss.commons-core.jar, but I haven't seen it registered nowhere as a service provider.
      org.jboss.commons-core.jar is a part of org.jboss.common-core module in AS7.
      Having there this service provider we will be able to pass the moduleId ( org.jboss.common-core ) as part of system property jboss.protocol.handler.modules, then ModularURLStreamHandlerFactory will do a lookup in our org.jboss.common-core module and try to find URLStreamHandler for the given protocol using default java mechanism.
      At the moment AS7 is configured to handle protocols through VFSStreamHandlerFactory which delegates this to jboss-vfs, in case of unknown protocol it fails, instead it should also check protocol against build in java mechanism.

              Unassigned Unassigned
              osgi-ready Krzysztof Maslak (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated: