[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Running transformations using JSTL
Does anyone have experience of running transformations using the JSP Standard Tag Library? I have a user who is attempting it, and is seeing symptoms that suggest that the same Transformer is being used in more than one thread. This is consistent with the JSTL spec, which says in section 13.1: "A more efficient approach is to process the transformation stylesheet once, and then save this "transformer" object for successive transformations. The specification allows implementations to support transparent caching of transformer objects to improve performance." But the JAXP Transformer is not reusable in this way. The Javadoc for javax.xml.transform.Transformer says "An object of this class may not be used in multiple threads running concurrently. Different Transformers may be used concurrently by different threads." The object that should be cached is the Templates object, not the Transformer. Is it possible that jstl has got this wrong? It would seem a surprisingly grave blunder. Perhaps in the Xalan implementation the Transformer object can be safely reused across threads, despite the JAXP specification saying it can't? Any insights welcome. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|