axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ias" <>
Subject RE: Patch: Memory leak in DeserializationContextImpl.parce() fixed
Date Mon, 31 May 2004 07:20:54 GMT
> Hello Axis Developers,
> We use Axis 1.1 in one of our products and as a result of a 
> number of performance tests we identified a memory leak in
> org.apache.axis.encoding.DeserializationContextImpl.parse() 
> method. The way the code was attempting to remove the 
> reference to "this" from the instance of SAXParser is just 
> plain wrong. Looking into Xerces code for the 
> SAXParcerImpl.setProperty() method null is not an acceptable value.

FYI, according to


Used to see some syntax events that are essential in some applications:
comments, CDATA delimiters, selected general entity inclusions, and the
start and end of the DTD (and declaration of document element name). The
Object must implement org.xml.sax.ext.LexicalHandler.  

Therefore, null value is unacceptable for the property in the sense above.



> I added a NullLexicalHandler inner class that can be used to 
> remove the reference and allow memory to be released. 
> Although it is not significant under light load conditions 
> the complexity of the messages and the load can cause the 
> pool of SAXParser instances maintained by XMLUtils to grow 
> significantly. The amount of memory that is held by each 
> instance of DeserializationContextImpl can be significant as 
> the message size grows. Examining the system with Jprobe 
> helped us identify the source of the problem and make this 
> change which corrected the problem for our application using 
> Axis 1.1 Final.
> The attached unified diff is against the latest CVS for Axis 
> 1.2. The exact same code would work in 1.1 as well, the diff 
> is trivial to apply.
> I do not have CVS accees but I used the ViewCVS facility to 
> download version 1.81 of this file and make the changes. 
> Would anyone of the commiters care to verify this fix and apply?
> Regards,
> Alex Volanis

View raw message