cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject More C2 thread savety issues
Date Mon, 24 Jul 2000 19:09:04 GMT
Hi all

I'm trying to think about a thread save Transformer component. But I
think with the current API it is impossible.

What happens during pipeline processing today is something similar to
this (example totally shortened):

    serializer.setOutputStream (out);
    transformer.setConsumer (serializer);
   generator.setConsumer (transformer);

The setConsumer method makes the transformer need to save the consumer
in a variable at class level. IMHO this prevents the transformer to be
thread save. Right, or am I stupid?

The same I think applies to the generator (setConsumer) and the
serializer (setOutputStream) as well.

I have no solution to this and Stefano stated in an earier mail that
sitemap components must be thread save. But the current API must be
changed dramatically () to allow this or sitemap components still have
to be instantiated for every single request or the sitemap component
itself instantiates some other component to achieve thread savetyness to
the sitemap. Does anybody has a good idea?

PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7           
CH-8166 Niederweningen                    Web:

View raw message