You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Philippe Waltregny-Dengis <ph...@nrb.be> on 2004/11/04 14:51:10 UTC
Pools of SAXTransformerFactory and TransformerHandler.
Hello,
I have a Java application that performs XSLT transformations. This application
uses:
- SAX events to feed the XSLT engine,
- TrAX
- and Xalan.
In addition to a cache of Templates I would like to pool SAXTransformerFactory
and TransformerHandler instances in order to avoid their creation/destruction,
and thus improve performances.
Do you think it's possible in a multithreaded application (Web application -
Servlet)? If it is, how to?
Thank you in advance for your collaboration.
Philippe Waltregny-Dengis
mailto:philippe.waltregny@nrb.be
Re: Pools of SAXTransformerFactory and TransformerHandler.
Posted by Morris Kwan <mk...@ca.ibm.com>.
Take a look at the SAX2SAX sample. It is under the samples\SAX2SAX
directory of your Xalan distribution.
You can use a ThreadLocal variable to cache SAXTransformerFactory and
TransformerHandler. You can also reuse the XMLReader by using the
org.apache.xml.utils.XMLReaderManager class.
Regards,
Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: mkwan@ca.ibm.com
Philippe
Waltregny-Dengis
<philippe.waltreg To
ny@nrb.be> xalan-j-users@xml.apache.org
cc
11/04/2004 08:51
AM Subject
Pools of SAXTransformerFactory and
TransformerHandler.
Hello,
I have a Java application that performs XSLT transformations. This
application
uses:
- SAX events to feed the XSLT engine,
- TrAX
- and Xalan.
In addition to a cache of Templates I would like to pool
SAXTransformerFactory
and TransformerHandler instances in order to avoid their
creation/destruction,
and thus improve performances.
Do you think it's possible in a multithreaded application (Web application
-
Servlet)? If it is, how to?
Thank you in advance for your collaboration.
Philippe Waltregny-Dengis
mailto:philippe.waltregny@nrb.be