cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: thread safety of cocoon
Date Mon, 01 Sep 2003 19:06:25 GMT
Upayavira wrote:

> Jorg Heymans wrote:
>> Say i write my own transformer (or serializer, or generator doesn't 
>> matter),

Transformers, in particular, can not be threadsafe. They are all 
Recyclable. This is due Transformer interface design (setContentHandler 
method in


>> is it true then that a new instance of my custom class is created 
>> each time
>> it is executed in a pipeline? (uncached)
>> My code relies on a few instance variables (simple ones like Logger 
>> but also
>> more crucial ones like StringBuffers for SAX parsing ), I'ld really 
>> hate to
>> find out now that instance variables aren't thread safe in cocoon.
> AFAIU, you need to make your component implement ThreadSafe for it to 
> be shared across threads. The default is that a new component is 
> created for each invocation.
> Regards, Upayavira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message