Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-827

URLHandlers does not restore the previous URLStreamHandlerFactory after stopping Felix

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • framework-1.2.1, framework-1.4.0
    • framework-1.4.1
    • Framework
    • None

    Description

      I'm running Felix embedded inside a webapp, running in Tomcat.

      Tomcat installs its own URLStreamHandlerFactory. Felix swaps it out correctly when I start it, and seems to delegate properly. When the webapp is unloaded, however, and it stops Felix, it does not restore the previous implementation, but rather leaves the existing URLHandlers instance installed. Then, if I try to redeploy the webapp without restarting the JVM, I get errors, because Tomcat automatically sets the URLHandlers class's static members to null when it unloads the webapp. (see https://issues.apache.org/bugzilla/show_bug.cgi?id=41939)

      I've tested this on 1.2.1 and 1.4.0, and both versions have this problem.

      Attachments

        1. test-felix-handler-1.0-SNAPSHOT.jar
          506 kB
          Tim Moore
        2. test-felix-handler.zip
          3 kB
          Tim Moore
        3. felix-827.patch
          3 kB
          Tim Moore
        4. leak.patch
          4 kB
          Karl Pauls

        Activity

          People

            karlpauls Karl Pauls
            tmoore Tim Moore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: