cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: [WARNING] Re: cvs commit: xml-cocoon/src/org/apache/cocoon/generation HTMLGenerator.java
Date Thu, 10 May 2001 05:54:37 GMT
> Berin Loritsch wrote:
> 
> cziegeler@apache.org wrote:
> > 
> > cziegeler    01/05/09 08:25:22
> > 
> >   Modified:    src/org/apache/cocoon/generation Tag: xml-cocoon2
> >                         HTMLGenerator.java
> >   Log:
> >   Made HTMLGenerator cacheable
> 
> >   -public class HTMLGenerator extends ComposerGenerator 
> implements Poolable {
> >   +public class HTMLGenerator extends ComposerGenerator 
> implements Cacheable {
> 
> PLEASE:
> 
> Do not confuse the difference between a Component that is 
> Poolable and one that is Cacheable!
> Sitemap Components are NOT Threadsafe, so they must either be 
> Poolable or SingleThreaded.
> Avalon Excalibur's Component Management Framework (which Cocoon 
> incidently uses), defaults
> to SingleThreaded (or FACTORY based creation) handling of 
> objects, in effect becoming
> SingleThreaded.  That means that for every request, a new 
> HTMLGenerator is created--instead
> of using a previously created one.
> 
> Cacheing is the process of checking if the requested resource (or 
> file) has been changed,
> and if not using the cached version.
> 
> POOLING AND CACHEING ARE DIFFERENT CONCERNS.
> 
> If you remove the Poolable interface from HTMLGenerator, in 
> essence you are saying
> that you want to instantiate, set the Logger, configure, setup 
> the sitemap component,
> perform cache checks, generate, and decommission the 
> HTMLGenerator for EACH request.
> By pooling, we only setup the sitemap component, perform cache 
> checks, and generate
> for each request.
> 
Yes, I really know the difference between Poolable and Cacheable.
BUT most components (e.g. all Generators, Transformers and Serializers)
extends the AbstractXMLProducer which is Recyclable!!!! 
So there is no need for all these components to declare the
Poolable interface by itself. 
I removed it as I found it very confusing the extend a base class
which is Recyclable and declare m


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message