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 Wed, 16 Jul 2008 08:13:19 GMT
Torsten Curdt <tcurdt <at> apache.org> writes:

> The question if those configuration are needed in a generic form in  
> the API. (I doubt it) As I would expect them to be implementation  
> specific a configuration callback that sets up the pipeline might be a  
> way around this?

I guess we are on the same position on this one, setup and clean up are usually
implementation specific and should therefore not be part of the API. Even for
the finish() method it might be necessary to pass a context or parameters.
Already passing it in setup() might be an option, but then you force the
component to have special handling for thread-safety.

Carsten Ziegeler <cziegeler <at> apache.org> writes:

> I added now a finish method which is called by the pipeline implementation.
> This keeps me free from any configuration hassels with the various 
> containers. Some want to use spring, some others something different.

But that's exactly what these container are there for.

> And perhaps someone doesn't want to use a container at all, just 
> instantiate the objects, run the pipeline and that's it.

By just instantiating the objects you know exactly with which implementation you
work - and which setup and finish method you are supposed to call.

> Therefore I really think that these lifecycle methods belong to the api.

That's what I don't agree with :-)

> I see no other reliable way of closing resources.

A listener/callback approach would be cleaner for the API, but more complex.
Question is if it needs to be part of the API at all.

Joerg


Mime
View raw message