[ http://issues.apache.org/jira/browse/XALANJ-1874?page=all ]
Brian Minchau updated XALANJ-1874:
----------------------------------
Bugzilla Id: (was: 29057)
fix-priority: fp4
Set fix priority fp4, per th
The setIncremental() feature of DTMManager should not be permitted through
transformer handler, because by it is architected it is difficult to know when
you are done with a transformer handler.
The architecture of DTM incremental processing is that it sets up a second
thread if it does not know if it is receiving events from Xerces to handle the
events. If the transformer handler, in the first thread, dies, for example
because it is out of memory, because the second thread with the DTM has
consumed the memory, then the second thread is hanging around that is holding
on to memory that might not ever get garbage collected.
It may be possible to use a finialize block somewhere and release the memory
held by the DTM, but the real solution will probably be not to make incremental
processing work when you have a transformer handler.
The transformer factory has a set attribute for incremental processing.
At the point that the attribute is set on the transformer factory it is not
known what kind of transformers are going to be created, perhaps transformer
handlers, perhaps XML filters.
If a transformer handler is created, the transfomer handler needs to indicate
that it is not going to all set incremental to be set on the DTM manager. This
is a low priority problem, and at best we are only likely to issue an error
message, and not set incremental on the DTM manager.
> Used memory is not released once OutOfMemoryError occurs when
> DTMManager.setIncremental() is set as true.
> ---------------------------------------------------------------------------------------------------------
>
> Key: XALANJ-1874
> URL: http://issues.apache.org/jira/browse/XALANJ-1874
> Project: XalanJ2
> Type: Bug
> Components: DTM
> Versions: 2.5
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: Kazutoshi Ono
> Priority: Critical
> Attachments: OutOfMemoryErrorTest.java, OutOfMemoryErrorTest.java
>
> [Summary]
> Used memory is not released once OutOfMemoryError occurs when
> DTMManager.setIncremental() is set as true.
> [Version]
> I tested this bug using the following versions.
> Xalan
> - XalanJ2 2.5.1
> - Xalan included in JRE 1.4.1_03
> OS/JVM
> - Windows XP Professional Version 2002 Service Pack1
> - Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02)
> (min/max heap size is not set.)
> [How to reproduce this bug]
> (1) Please download attachment named as OutOfMemoryErrorTest.java.
> (2) Please compile OutOfMemoryErrorTest.java and execute OutOfMemoryErrorTest.
> OutOfMemoryError occurs in saxTransform(heavy) and the used memory is not
> released so that saxTransform(light) fails either.
> [Memo]
> (1) The used memory is released if DTMManager.setIncremental() is set as
> false. I set this field as true because I want to use incremental function in
> XPath evaluation to make it faster.
> (2) The used memory is released if heavyCount is set as 110000.
> (3) I reported severity as critical because JVM needs to be restarted when
> this problem occurs. It's critical when XSLT transformation is executed in
> server-side applications.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]