You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Feist (JIRA)" <ji...@apache.org> on 2010/01/18 14:07:54 UTC

[jira] Created: (CXF-2624) Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP

Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP
----------------------------------------------------------------------

                 Key: CXF-2624
                 URL: https://issues.apache.org/jira/browse/CXF-2624
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 2.1.5
            Reporter: Daniel Feist


See: http://old.nabble.com/Classloader-leakage-when-using-JAXB-binding-in-appServer-td26101445.html

This map continues to have reference to classes generated and used by the now undeployed webapp meaning the webapp classloader never goes  away. 
The implementation of this map although weak is not weak enough,  because if a entry references a key (it seems to) then the key although it is a WeakReference never goes away and therefore neither does the entry (the classloader). 

See the "implementation note" 2/3 of the way through the javadoc here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/WeakHashMap.html

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


[jira] Commented: (CXF-2624) Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802327#action_12802327 ] 

Daniel Kulp commented on CXF-2624:
----------------------------------


Changing the WeakIdentityHashMap is not really what we want to do as it's used (indirectly) in a bunch of places where we may not want the value held by a weak reference.   

In anycase, this is now fixed for 2.2.6 as I've changed the ASMHelper to use:
new WeakIdentityHashMap<Class<?>, WeakReference<TypeHelperClassLoader>>()

So both key and value are held weakly.



> Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP
> ----------------------------------------------------------------------
>
>                 Key: CXF-2624
>                 URL: https://issues.apache.org/jira/browse/CXF-2624
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.5
>            Reporter: Daniel Feist
>             Fix For: 2.1.9, 2.2.6
>
>         Attachments: WeakIdentityHashMap.java.patch
>
>
> See: http://old.nabble.com/Classloader-leakage-when-using-JAXB-binding-in-appServer-td26101445.html
> This map continues to have reference to classes generated and used by the now undeployed webapp meaning the webapp classloader never goes  away. 
> The implementation of this map although weak is not weak enough,  because if a entry references a key (it seems to) then the key although it is a WeakReference never goes away and therefore neither does the entry (the classloader). 
> See the "implementation note" 2/3 of the way through the javadoc here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/WeakHashMap.html

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


[jira] Resolved: (CXF-2624) Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2624.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.6
                   2.1.9
         Assignee: Daniel Kulp

> Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP
> ----------------------------------------------------------------------
>
>                 Key: CXF-2624
>                 URL: https://issues.apache.org/jira/browse/CXF-2624
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.5
>            Reporter: Daniel Feist
>            Assignee: Daniel Kulp
>             Fix For: 2.1.9, 2.2.6
>
>         Attachments: WeakIdentityHashMap.java.patch
>
>
> See: http://old.nabble.com/Classloader-leakage-when-using-JAXB-binding-in-appServer-td26101445.html
> This map continues to have reference to classes generated and used by the now undeployed webapp meaning the webapp classloader never goes  away. 
> The implementation of this map although weak is not weak enough,  because if a entry references a key (it seems to) then the key although it is a WeakReference never goes away and therefore neither does the entry (the classloader). 
> See the "implementation note" 2/3 of the way through the javadoc here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/WeakHashMap.html

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


[jira] Updated: (CXF-2624) Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP

Posted by "Daniel Feist (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Feist updated CXF-2624:
------------------------------

    Attachment: WeakIdentityHashMap.java.patch

Patch for WeakIdentityHashMap.java that resolve the problem described in the user list thread by taking into account the "implementation note" 2/3 of the way through the javadoc here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/WeakHashMap.html 

> Classloader leakage in org.apache.cxf.common.util.ASMHelper.LOADER_MAP
> ----------------------------------------------------------------------
>
>                 Key: CXF-2624
>                 URL: https://issues.apache.org/jira/browse/CXF-2624
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.5
>            Reporter: Daniel Feist
>         Attachments: WeakIdentityHashMap.java.patch
>
>
> See: http://old.nabble.com/Classloader-leakage-when-using-JAXB-binding-in-appServer-td26101445.html
> This map continues to have reference to classes generated and used by the now undeployed webapp meaning the webapp classloader never goes  away. 
> The implementation of this map although weak is not weak enough,  because if a entry references a key (it seems to) then the key although it is a WeakReference never goes away and therefore neither does the entry (the classloader). 
> See the "implementation note" 2/3 of the way through the javadoc here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/WeakHashMap.html

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