You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "nihongye (JIRA)" <ji...@apache.org> on 2013/10/11 08:50:43 UTC

[jira] [Comment Edited] (CXF-4529) PermGen Leak for CXFAuthenticator (WS Client Configuration)

    [ https://issues.apache.org/jira/browse/CXF-4529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13792408#comment-13792408 ] 

nihongye edited comment on CXF-4529 at 10/11/13 6:48 AM:
---------------------------------------------------------

but in CXFAuthenticator 
{code}
 Class<?> cls = loader.loadClass(ReferencingAuthenticator.class.getName());
                Authenticator auth = (Authenticator)cls.getConstructor(Authenticator.class, Authenticator.class)
                    .newInstance(instance, wrapped);
{code}
“newInstance(instance, wrapped)” param instance is load by webappclassloader,so the webappclassloader is refence from the system classloader


was (Author: nihongye):
but in CXFAuthenticator 
{code}
 Class<?> cls = loader.loadClass(ReferencingAuthenticator.class.getName());
                Authenticator auth = (Authenticator)cls.getConstructor(Authenticator.class, Authenticator.class)
                    .newInstance(instance, wrapped);
{/code}
“newInstance(instance, wrapped)” param instance is load by webappclassloader,so the webappclassloader is refence from the system classloader

> PermGen Leak for CXFAuthenticator (WS Client Configuration)
> -----------------------------------------------------------
>
>                 Key: CXF-4529
>                 URL: https://issues.apache.org/jira/browse/CXF-4529
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration, JAX-WS Runtime
>    Affects Versions: 2.6.1
>         Environment: Apache Tomcat 7, Windows 7 32bit
>            Reporter: Holger Sunke
>            Assignee: Daniel Kulp
>              Labels: leak, permgen
>             Fix For: 2.7.1
>
>
> Hello,
> seemes to me there is a memory leak with the CXFAuthenticator. There is a static reference to it in java.net.Authenticator.theAuthenticator .
> This prevents the GC from collecting the WebappClassLoader on hot undeployment.
> I helped myself by doing 
> java.net.Authenticator.setDefault(null);
> on contextDestroy().
> Our web application uses CXF as a jasWS client configured with Spring 3.0.5.



--
This message was sent by Atlassian JIRA
(v6.1#6144)