United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6928198 reset() method in the Transformer does not reset to its original state, causes the memory to grow.
JDK-6928198 : reset() method in the Transformer does not reset to its original state, causes the memory to grow.

Details
Type:
Bug
Submit Date:
2010-02-20
Status:
Closed
Updated Date:
2012-04-24
Project Name:
JDK
Resolved Date:
2010-02-23
Component:
xml
OS:
generic
Sub-Component:
javax.xml.transform
CPU:
generic
Priority:
P1
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0 (1.4)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

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

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.
                                     
2010-02-22
EVALUATION

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



Hardware and Software, Engineered to Work Together