cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: [C2]: Component Pooling and recycling
Date Tue, 27 Feb 2001 09:17:20 GMT
> Giacomo Pati [mailto:giacomo@apache.org] wrote:
> Berin Loritsch wrote:
> > Carsten Ziegeler wrote:
> > > Using the latest cvs of C2, I have the following questions/remarks to
> the
> > > component pooling:
> > >
> > > Questions first:
> > > 1. Looking up a component using the ComponentManager:
> > >    - Am I right that when the component is not Poolable I always get
> the
> > > same instance?
> >
> > No.  Some are Factory components and are created fresh each time.  If it
> is
> > marked ThreadSafe, then you should get the same instance everytime.
> >
> > >    - When the component is Poolable (or PoolClient) is it the response
> of
> > > the "looking up component" to put it back into the pool ?
> >
> > Unfortunately, that is the way it is.  This does not change even when we
> > are using the Pool interface like it was meant to be used (get/put).
> > BTW: the "looking up component" is called a Composer--it even has an
> > interface.
> >
> > > 2. Is it correct that Actions are never pooled or recycled?
> >
> > Yes.  They are ThreadSafe by design, and so should be one instance for
> all
> > time.
> >
> > > Now the remarks:
> > >
> > > 3. If a sitemap component is only Recyclable (without Poolable or
> > > PoolClient) it is not recycled.
> >
> > True.  Recyclable does not necessarily mean Poolable (Not sure of the
> > reasoning, but that's the way the framework is set up).  The recycle()
> > method is used to "reset" the component back to it's original status.
> 
> Take a look at the Recyclable interface! It extends Poolable.

Arghhhh, sorry for this stupid thread - I never saw the "extends Poolable" line...
Perhaps its time to wear glaces...or take some time off....

Carsten


Mime
View raw message