DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24826>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24826 Transformer.transform is not thread safe (with nested xslt's) Summary: Transformer.transform is not thread safe (with nested xslt's) Product: XalanJ2 Version: 2.3Dx Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.transformer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] XSLT example (simplified) : <xsl:stylesheet ....> <!-- some common templates --> <xsl:import ...> <!-- rest of the file --> </xsl:stylesheet> Code example (simplified): synchronized Transformer resolveTransformer (String transformationCode) [ Templates template = getFromTheCacheOrCreate (transformationCode); return template.newTransformer (); } Transformer transformer = resolveTransformer (transformationCode); transformer.transform (src, dst); // NullPointer exception processing inner xslt, // if the same template was used by more than one thread. synchronized (transformer) { transformer.transform (src, dst); // All fine. } Documentation says, that Transformer object is reentrant and thread safe.
