cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: Reuse of pipelines in java
Date Mon, 22 Aug 2011 15:25:55 GMT
On Thu, 2011-08-18 at 11:39 +0200, Thorsten Scherler wrote:
> On Tue, 2011-08-16 at 22:45 +0200, Sylvain Wallez wrote:
> > 
> > Please read: I suggested to clone them, so that there is no need for 
> > them nor their components to be thread safe. You create a "master" 
> > pipeline that is never executed and then deep-clone it every time it 
> > needs to be processed.
> Actually that sounds very interesting for NonCaching pipes, however the
> main problem ATM for me is that I cannot execute a pipeline two times.

In in the end I did the clone approach due to the limitation that I was
not able to reuse the same pipe. So I created:

public class SummaryPipe extends
NonCachingPipeline<StAXPipelineComponent> implements Cloneable{
 public Object clone() throws CloneNotSupportedException{

The pipe is a pre-setup pipeline wich I then configure via my custom 
public void setup(Myargs args,...){
//prepare components with args

and in my business code I do 

clone = (SummaryPipe) pipe.clone();
clone.setup(Myargs args,...);

> If that is a limitation of the pipes or a bug I do not know, but reading
> Steven answer makes me think it is a bug.

Actually somebody with more knowledge on the pipeline API may comment on

Thorsten Scherler <>
codeBusters S.L. - web based systems
<consulting, training and solutions>

View raw message