[jboss-jira] [JBoss JIRA] Commented: (JBAS-8424) RestEasy deployer won't release Weld BeanManager on undeploy

Stan Silvert (JIRA) jira-events at lists.jboss.org
Wed Sep 22 14:31:29 EDT 2010


    [ https://jira.jboss.org/browse/JBAS-8424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12552502#action_12552502 ] 

Stan Silvert commented on JBAS-8424:
------------------------------------

I just fixed the leak that I was talking about yesterday.  Archive.java and ArchiveInfo.java both were using a WeakHashMap with the classloader as a key.  But WeakHashMap will not work if the value holds a reference to its key.  See javadoc for WeakHashMap.  Anyway, I just wrapped the value in a WeakReference and that fixed the problem.

However, I only know that it fixed the problem I saw with the four leaking classes I mentioned.  I don't know if this is the solution for your original problem.

Also, I'm wondering why you would need to use WeakHashMap in the first place.  You should be able to use strong references and just clean everything up during undeploy.  But I don't know this code well enough to say for sure.

Please check over what I've done.  Again, I'm not familiar with this code but I know that my fix does stop the leak of the four classes I mentioned.

Unfortunately, it does not fix my JSF undeploy leak.

> RestEasy deployer won't release Weld BeanManager on undeploy
> ------------------------------------------------------------
>
>                 Key: JBAS-8424
>                 URL: https://jira.jboss.org/browse/JBAS-8424
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Deployers
>    Affects Versions: 6.0.0.CR1
>         Environment: JBoss AS 6.0.0-SNAPSHOT, Linux 64 bit
>            Reporter: David Allen
>            Assignee: Bill Burke
>            Priority: Blocker
>             Fix For: 6.0.0.CR1
>
>
> ThreadLocalResteasyProviderFactory in RestEasy has a reference to a CdiInjectorFactory that is not released when the application is undeployed from JBoss AS.  This CdiInjectorFactory holds a reference to a BeanManager from Weld, and thus leaks all the beans from the deployment.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list