cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Re: AW: [C2]: Dispose of sitemap components
Date Thu, 30 Nov 2000 12:00:53 GMT

--- Carsten Ziegeler <cziegeler@sundn.de> wrote:
> > Definitely use the Disposable Interface.  I would have to double
> check,
> > but the Avalon Pool system checks for Dispose interface to properly
> > handle those things when the Object is returned to the pool.
> > 
> > > 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
> > > too.
> > 
> > Any pooled component should not depend on the garbage collector to
> > clean up after it.  It either needs to clean up after itself, or 
> > it needs to
> > implement the Disposable/Recyclable interface to perform the
> cleanup.
> > 
> > Which Pool are you using?
> > org.apache.avalon.utils.recycle or org.apache.avalon.util.pool?
> > 
> > The util.pool package is the one we are going to use in the future,
> and
> > has been optimized to be quicker than recycle.
> >
> Does this mean, if Cocoon would use the right pool and the
> SitemapComponents 
> (e.g. Transformer) implement the Disposable interface the dispose
> method 
> would be called automatically? And I don't need to patch anything :-)

If the avalon AbstractPool does not do that the cocoon ComponentPool
(which extends AbstractPool) will do it by overrighting the mothod
which should do it. But basically it's a task avalon classes should
take care about. But because we don't have implemented the real avalon
Lifecycle (we dont have the init() method implemented) we'll might be
doing it ourselfs. What do you mean, Berin?

Giacomo

=====


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message