Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2554

Add SlingFelix.getBundle(Class) method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Launchpad Base 2.4.0
    • Launchpad Base 2.5.0
    • Launchpad
    • None

    Description

      The Felix framework URLHandlers class implements multiplexing for the JVM URLStreamHandlers. To find out what framework a class on the call stack belongs to, it calls the Felix.getBundle(Class) method finding the method using the Class.getDeclaredMethod method.

      Since the framework instance in question is the SlingFelix class, the getDeclaredMethod call fails because SlingFelix does not have such a method and thus the URLHandlers class fails to properly operate.

      This issue prevents two or more Sling instances to be deployed as web applications into the same servlet container with URLStreamHandler support enabled.

      The fix is to implement the required method and delegate to the Felix class (using reflection again).

      A workaround is to disable URLStreamHandler support in the framework by setting the following property in the sling.properties file:

      felix.service.urlhandlers=false

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: