cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [C2]: Component Pooling and recycling
Date Mon, 26 Feb 2001 16:59:44 GMT
Giacomo Pati 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.

The issue is that we need to differentiate between the two types of
Components _without_ bringing it back to ground zero.  We might try
a Reconfigurable interface that might make it more worthwile.  The
question is how to get the right Configuration object to the component
instance.

> 
> Giacomo (Still 187 mails to read)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Mime
View raw message