JDK-6928198 : reset() method in the Transformer does not reset to its original state, causes the memory to grow.
  • Type: Bug
  • Component: xml
  • Sub-Component: javax.xml.transform
  • Affected Version: 1.4.0
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-02-20
  • Updated: 2012-04-24
  • Resolved: 2010-02-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7
1.4.0 1.4Fixed 6u21Fixed 7Fixed
Description
BPEL-SE in the JavaCAPS 6.2 uses the JAXP 1.4 Transformer Pool for transformations. After the transformation of the payload, there is no mechanism to change the state of the transformer to its original state. The reset() method does not clear all the values.
The TransletOutputHandlerFactory within the Tranformer to hold the reference to the writer which inturn holds the result from the transformation. 

Since the data of transformation is held within the Transformer, large message transformation resulted in the growth of the memory consumption.

Comments
EVALUATION Fixed in jaxp 1.4 on java.net. Verified by user.
23-02-2010

EVALUATION What's described in the report should have been done in accordance with the API documentation for the reset method as copied below: Reset this Transformer to its original configuration. Transformer is reset to the same state as when it was created with TransformerFactory.newTransformer(), TransformerFactory.newTransformer(Source source) or Templates.newTransformer(). reset() is designed to allow the reuse of existing Transformers thus saving resources associated with the creation of new Transformers. The reset Transformer is not guaranteed to have the same URIResolver or ErrorListener Objects, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal URIResolver and ErrorListener.
22-02-2010