cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: [C2]: Dispose of sitemap components
Date Wed, 29 Nov 2000 12:17:27 GMT

--- Carsten Ziegeler <> wrote:
> Hi,
> what do you think of a dispose() method for each sitemap component
> (generator, transformer, serializer etc) as an equivalent to the
> setup() method?
> 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.
> If there is interest I would write voluntarely the patches for the
> components (adding a dispose() method with no parameters).

Well, I don't see this will hurt the architecture in any way. But I
suggest you use the Avalon interfaces Disposable for that. 

Berin, any addition to this would be appriciated :).

Also take into account that for pooled Component there is the
Recyclable interface for exact that reason. The recycle methed gets
called when the component is put back into the pool. May this will help



Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

View raw message