axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Rheinheimer (JIRA)" <>
Subject [jira] Created: (AXIS2-3641) memory leaks related to unmarshaller pooling
Date Wed, 19 Mar 2008 21:28:29 GMT
memory leaks related to unmarshaller pooling

                 Key: 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:
For additional commands, e-mail:

View raw message