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]: Component Pooling and recycling
Date Mon, 26 Feb 2001 17:00:02 GMT
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.

Giacomo (Still 187 mails to read)

Mime
View raw message