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

Mike Rheinheimer resolved AXIS2-3641.
-------------------------------------

    Resolution: Fixed

Fixed in rev 639025.  Thanks David Strite for the fix!

> memory leaks related to unmarshaller pooling
> --------------------------------------------
>
>                 Key: AXIS2-3641
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3641
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Mike Rheinheimer
>            Assignee: Mike Rheinheimer
>             Fix For: 1.4
>
>         Attachments: patch.txt
>
>
> David Strite provides the following comments and attached patch to fix:
> Enabling the pooling of the unmarshallers surfaced a few small memory leaks.
> 1. The first is caused by a race condition creating the innerMap and 
> JAXBContext in JAXBUtils. Currently multiple equivalent JAXBContexts can be 
> created. When the unmarshallers are pooled, the JAXBContext is the key, 
> meaning the JAXBContext and Unmarshaller are kept around. Since only one of 
> these will be in the jaxbMap, the rest are never used but never get cleaned 
> up. Synchronizing around the puts solves this problem.
> 2. The second leak is caused by the AttachmentUnmarshallers on the JAXB 
> Unmarshaller. The AttachmentUnmarshallers hold on to the MessageContext. 
> These will not be cleaned up until the next request sets a new 
> AttachmentUnmarshaller on that Unmarshaller. Setting the 
> AttachmentUnmarshaller to null before putting the Unmarshaller in the pool 
> resolves this.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to