You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Tim Moore (JIRA)" <ji...@apache.org> on 2008/11/20 02:07:44 UTC

[jira] Updated: (FELIX-827) URLHandlers does not restore the previous URLStreamHandlerFactory after stopping Felix

     [ https://issues.apache.org/jira/browse/FELIX-827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Moore updated FELIX-827:
----------------------------

    Attachment: test-felix-handler-1.0-SNAPSHOT.jar

Here is a simple test case that demonstrates the problem. You should be able to run it by just running 'java -jar test-felix-handler-1.0-SNAPSHOT.jar'. It bundles Felix framework 1.4.0 and its transitive dependencies.

Here's the output I get:

tmoore@16:54:07$ java -jar target/test-felix-handler-1.0-SNAPSHOT.jar 
Initital URLStreamHandlerFactory: null
after starting Felix: org.apache.felix.framework.URLHandlers@d0220c
after stopping Felxi: null
after installing custom: com.atlassian.test.TestFelixHandler$1@ac5f13
after re-starting Felix: org.apache.felix.framework.URLHandlers@57ea52
after re-stopping Felix: org.apache.felix.framework.URLHandlers@57ea52


The last line, "after re-stopping Felix" should have restored the custom factory, "com.atlassian.test.TestFelixHandler$1@ac5f13"

> URLHandlers does not restore the previous URLStreamHandlerFactory after stopping Felix
> --------------------------------------------------------------------------------------
>
>                 Key: FELIX-827
>                 URL: https://issues.apache.org/jira/browse/FELIX-827
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1
, felix-1.4.0
>            Reporter: Tim Moore
>         Attachments: test-felix-handler-1.0-SNAPSHOT.jar
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.