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: [EMAIL PROTECTED]
Philippe
Waltregny-Dengis
<philippe.waltreg To
[EMAIL PROTECTED]> [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
- Pools of SAXTransformerFactory and TransformerHa... Philippe Waltregny-Dengis
- Morris Kwan
