Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
2.6
-
None
-
None
-
JBoss 3.2.6 AS, JDK 1.4.2, Windows 2000
Description
I use Xalan/Xerces to perform FOP processing inside a J2EE application.
I recently introduced the use of Templates object as a performance optimization.
As the spec says Templates objects have to thread safe, I used it as static field from which I creates Transformer objects.
Note that each thread receives its own Transformer object, so the use seems correct regarding threading issues.
However I noticed thereafter a memory leak inside the AS in case of important load.
Using a profiling tool, I saw TransformerImpl objects (and the associated object graph) filling up the memory.
The root to the GC showed references from the static Templates field.
I observed this phenomenon wih Xalan 2.4.1 but upgrading to version 2.6 did not help.
The reference graph shows something like :
StylesheetRoot (static) -> Vector[ElemTemplate] -> ... -> SAX2DTM -> TransformerImpl
I can attach the full graph if needed.
I saw related issues talking about Iterator objects keeping references and there are indeed Iterator objects involved in the reference graph.
But in my case this shows up only in the case of an heavily threaded environment.
Anyway, the result is an application server whose memory is filled up and unusable.