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

Re: JAXP Transformer contract

Subject: Re: JAXP Transformer contract
From: Johannes Döbler <jd@xxxxxxxxxxxxxx>
Date: Sat, 12 May 2001 13:21:40 +0200
jaxp transformer

Saxon comes with a SaxonServlet.java that demonstrates a caching pattern
using a HashTable, and it seems to work well. Can someone email me
off-list with the design pattern for "pooling" objects such as
Transformer? I am assuming this means you have several Transformer
objects available, to make up for the lack of thread safety... if you
need one, it won't give you one unless it is believed to not be in use?

- Mike

In database programming this pattern is known as ConnectionPool, but one can easily extend ot to all kind of shared resources. Wikis Pattern Repository's (http://c2.com/cgi/wiki?ConnectionPatterns) has some useful material about it.



Remarkably well considering how simplistic it is: it just accumulates
compiled stylesheets in the "cache" until you clear them all out. None of
those fancy LRU discard algorithms designed for poor souls with finite
amounts of memory...

Mike Kay

never heard of an unfinite amount of memory :-)
But the caching problem has a simpler solution: Just use a xslt implementation with a threadsafe stylesheet object. (Of course TrAX does not suppose thread safety - but that's just the mess with an API designed after implementations were created).


Johannes


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.