You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Soosai, Lourdhu Vasanth" <Lo...@aetna.com> on 2005/02/17 05:30:50 UTC

RE: memory leaks

 
 
  I am having memory leaks with Xalan/Xerces shipped with Websphere 5.1
happens in high volume only 
	
 Below is what I do ....
  
javax.xml.transform.Templates is cached in a static array, and reused
for each Transformation.



Like the below 
				// init during servlet init
				private static Templates[] styleHolder;
				private TransformerFactory tf;
				private Transformer t;
				StreamSource ss = new
StreamSource(styles[i]);
				styleHolder[i] = (Templates)
tf.newTemplates(ss);
				
				// transforms in a jsp using custom tag
for multiple jsp

				// transform from cache
				Templates tmpl =
StyleFactory.getProcessor(key);
      				Transformer tf = tmpl.newTransformer();
				// do the regular transform
				StreamResult sr= new
StreamResult(pageContext.getOut());
				tf.transform(xmlsrc, sr);
				

 I know this is not the right user group . 
  If any one is familiar with the problem please let me know ...

 Thanks
Vasanth


-----------------------------------------
This e-mail may contain confidential or privileged information.  If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org