cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giovanni Borelli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6632) Memory leak due to literal keys in WSDLDefinition map
Date Fri, 09 Oct 2015 06:42:27 GMT

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

Giovanni Borelli commented on CXF-6632:
---------------------------------------

Correct, so we must be missing something since changing line 267 in WSDLManagerImpl to:

{code}
           definitionsMap.put(new String(url), def);
{code}

fixes the leak issue.

Here is the complete stacktrace:
{code}
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:265),
 org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:205),
 org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:158),
 org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149),
 org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101),
 javax.xml.ws.Service.<init>(Service.java:77),
...
{code}



> Memory leak due to literal keys in WSDLDefinition map
> -----------------------------------------------------
>
>                 Key: CXF-6632
>                 URL: https://issues.apache.org/jira/browse/CXF-6632
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7.17
>            Reporter: Giovanni Borelli
>            Assignee: Bharath Ganesh
>
> Looks like the definitionsMap in WSDLManagerImpl holds the WSDLDefinitions against a
weak key, again relying
> on the WeakHashMap semantics for removal.
> The loadDefinition(String) method loads the WSDLDef and puts this in a map
> against a String key even if it was passed as a URL through getDefinition(URL). 
> Like the https://issues.apache.org/jira/browse/CXF-1639 this causes a memory leak.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message