On 29 Mar 2011, at 22:13, Eric Douglas wrote: > I did include the new statement. The declaration is up at the class > level. There should be one factory for the class and one transformer > per instance.
OK, that should be safe, indeed. <snip /> > It's only when I run 2 at once the first transform > crashes. That error message sounds like there was an error reading in > the xsl file though the read statements didn't crash. Are both concurrent transformations trying to read the same XSL source file? As a crude attempt, perhaps you could try to synchronize the bare file access. I know some platforms have less of an issue with concurrent read-only access to files, but still... If that works and the use case allows it, there may be a more elegant/efficient solution, in the form of a call to TransformerFactory.newTemplates(). You can create one Templates instance for the same stylesheet, and instantiate multiple Transformers off of it. A Templates is also supposed to be thread-safe, so if you're always using the very same XSLT file, it can probably save you some overhead. Regards Andreas --- --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org