You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Oliver Xie <ox...@smallworld.com> on 2000/05/19 21:14:01 UTC

Threading problem in the XSLT Processor

Hello,

I'm using Cocoon 1.7 and running into a thread related problem in a
multi-user environment. I would see the "Error found handling the request"
exception when my producer instance (a subclass of AbstractProducer)handles
multiple requests. By looking into the exception,
org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:10
3), I figured that the problem might be caused by the race conditions among
multiple requests to the processor instance. After added synchronization to
the process method in XSLTProcessor.java, the problem has gone away. Does
anyone know this thread safe issue in Cocoon's processing level, and have a
better solution to it?

Oliver Xie
oxie@smallworld.com



Re: Threading problem in the XSLT Processor

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 May 2000, Oliver Xie wrote:

> Hello,
> 
> I'm using Cocoon 1.7 and running into a thread related problem in a
> multi-user environment. I would see the "Error found handling the request"
> exception when my producer instance (a subclass of AbstractProducer)handles
> multiple requests. By looking into the exception,
> org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:10
> 3), I figured that the problem might be caused by the race conditions among
> multiple requests to the processor instance. After added synchronization to
> the process method in XSLTProcessor.java, the problem has gone away. Does
> anyone know this thread safe issue in Cocoon's processing level, and have a
> better solution to it?

First of all, are you really using 1.7? We're all the way up to 1.7.4, I'd
really recommend upgrading as we've patched many bugs since then. Secondly
- cocoon creates a new XSLTProcessor from Xalan's XSLTProcessorFactory for
every XSLT transformation. I assume that is threadsafe; perhaps Scott
might be able to comment on this though? In any case, do you mind
upgrading to 1.7.4 and seeing if you still encounter this problem? If so,
we'll track it down. (oh, and if you're not using Xalan, that would be
relevant information :))

- donald


Re: Threading problem in the XSLT Processor

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 May 2000, Oliver Xie wrote:

> Hello,
> 
> I'm using Cocoon 1.7 and running into a thread related problem in a
> multi-user environment. I would see the "Error found handling the request"
> exception when my producer instance (a subclass of AbstractProducer)handles
> multiple requests. By looking into the exception,
> org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:10
> 3), I figured that the problem might be caused by the race conditions among
> multiple requests to the processor instance. After added synchronization to
> the process method in XSLTProcessor.java, the problem has gone away. Does
> anyone know this thread safe issue in Cocoon's processing level, and have a
> better solution to it?

First of all, are you really using 1.7? We're all the way up to 1.7.4, I'd
really recommend upgrading as we've patched many bugs since then. Secondly
- cocoon creates a new XSLTProcessor from Xalan's XSLTProcessorFactory for
every XSLT transformation. I assume that is threadsafe; perhaps Scott
might be able to comment on this though? In any case, do you mind
upgrading to 1.7.4 and seeing if you still encounter this problem? If so,
we'll track it down. (oh, and if you're not using Xalan, that would be
relevant information :))

- donald