cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <>
Subject Re: [C2]: Dispose of sitemap components
Date Thu, 30 Nov 2000 00:02:12 GMT

----- Original Message -----
From: Carsten Ziegeler <>
To: <>
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()

Quick question: why setup()?  Avalon has the Initializable interface with
init() that is for the same purpose.

> 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).

View raw message