cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [Corona] PIpeline API
Date Tue, 15 Jul 2008 13:08:29 GMT
Carsten Ziegeler <cziegeler <at> apache.org> writes:

> >> c) Pre and post processing
> >> As the pipeline interfaces are not tied to sax or any other model 
> >> (which is ok), there is no explicit notion of indicating that the 
> >> processing starts or is finished - the latter is especially 
> >> interesting for cleanup. So I think we should add these two lifecycle 
> >> methods to the pipeline component interface.
> > 
> > I don't see any problem either. Being curious, what are your use cases?
> I've some pipeline components that open/close resources, like a JCR 
> session for instance. If the contract includes that the pre and post 
> processing methods are always called, the post processing method acts 
> like kind of a disposal method where I can close my session.
> I've other - in this sense rather obscure - use cases where the pipeline 
> components need to pass information back to the caller before the 
> processing starts. So the caller calls the pre processing method where 
> the pipeline component adds something to the map, the caller can pick it 
> up and then start the processing based in this information.

Isn't that a rather specific use case? It feels kinda "wrong" when lifecycle
methods will now "pollute" the pipeline interfaces rather than letting pipeline
components implement lifecycle interfaces. Doesn't Spring show how to do these
kind of things with templates or aspects?

And is there actually something like "start" and "end" in a pipeline? How do you
determine that? It's rather easy with SAX since there is startDocument() and
endDocument() but in general?

It's not an objection, just some thoughts ...

Joerg


Mime
View raw message