[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Reusing XT instances

Subject: Re: Reusing XT instances
From: "Robert Streich" <rstreich@xxxxxxxxxx>
Date: Fri, 28 Jan 2000 16:41:39 -0800
robert streich
At 09:44 PM 1/28/00 +0100, Eric van der Vlist <vdv@xxxxxxxxxxxx> wrote:
The XSLServlet works in a servlet environment which is multi threaded
and it wouldn't be safe to use the same object.

This much, I could take care of by locking the processor to ensure sequential access. If this slows down access, a good appserver should create new servlet instances to keep up with demand.

SAX says that a parser is reusable but not reentrant. To me, this means
that a SAX parser is not thread-safe, so in any multi-threaded environment,
you'd have to lock the parser.

However, the longest operation is the parsing of the XSLT transformation
which is done before the XSLProcessor is cached and therefore, this
parsing is reused.

Unfortunately, I have to write this assuming that the stylesheet will be different for every run. tr.SheetImpl looks to be pretty well encapsulated and XSLProcessorImpl.loadStylesheet() replaces the current stylesheet.

It's an interesting point that you brought up, however. It could be worthwile
to cache the Sheet. It'd make for a lot of rigamarole, but it might be
worth considering.

Robert Streich
Calico Commerce

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.