cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [C2]: Dispose of sitemap components
Date Thu, 30 Nov 2000 06:46:16 GMT
Berin Loritsch wrote:
> 
> ----- Original Message -----
> From: Carsten Ziegeler <cziegeler@sundn.de>
> To: <cocoon-dev@xml.apache.org>
> Sent: Wednesday, November 29, 2000 6:13 AM
> Subject: [C2]: Dispose of sitemap components
> 
> > Hi,
> 
> > what do you think of a dispose() method for each sitemap component
> (generator, transformer, serializer etc) as an equivalent to the setup()
> method?
> 
> Quick question: why setup()?  Avalon has the Initializable interface with
> init() that is for the same purpose.

Well, it's not setup() but setup(...., ...., ....) and it's used to pass
run time request parameters and alike to a component before calling its
generate/transfor/serialize functionality. Is this the same purpose as
init() was meant to?

> 
> > The dispose() method would be called after the pipeline has finished and
> each component has the chance to clean up.
> > This is especially important if an exception occurs in the pipeline: If
> the generator throws an exception none of the following components get aware
> of this.
> > If for example the SQLTransformer has already opened the connection this
> will never be closed properly, because if the components are pooled they
> will not garbage collected.
> 
> absolutely.  The Pipeline objects are basically one time use, and then
> thrown away.
> 
> > If there is interest I would write voluntarely the patches for the
> components (adding a dispose() method with no parameters).

Giacomo

Mime
View raw message