cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renaud Bruyeron <bruye...@fullsix.com>
Subject Re: isolate the pipeline "component" from rest of cocoon
Date Fri, 20 Oct 2006 14:33:51 GMT
Vadim Gritsenko wrote:
> Renaud Bruyeron wrote:
>>
> It is possible to use pipelines directly, it would look something like:
> 
>   ...setup container...

Is that the avalon container, or is it a spring container? Is there an 
example of this somewhere?

> 
>   ProcessingPipeline pipeline = new [Non]CachingProcessingPipeline();
>   pipeline.enableLogging(...);
> 
>   while (...) {
>     pipeline.setup(new Parameters());
> 
>     // Pipeline will get generator from container
>     pipeline.setGenerator("file", ...);
>     pipeline.addTransformer("xslt", ...);
>     pipeline.setSerializer("html", ...);
> 
>     Environment env = new BackgroundEnvironment(...);
>     pipeline.process(env);
>     pipeline.recycle();
>   }

This looks simple enough. The recycle() method is not part of the 
ProcessingPipeline interface, but all its implementations are Recyclable 
(I guess this is avalon speak for "to be used in a pool", and therefore 
I can assume that the implementations are not threadsafe, right?).
Am I correct in assuming that cocoon pools instances of the pipelines 
(one per thread) when in a webapp context ?

  - Renaud


Mime
View raw message