cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject [WARNING] Re: cvs commit: xml-cocoon/src/org/apache/cocoon/generation HTMLGenerator.java
Date Wed, 09 May 2001 17:18:43 GMT
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.

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


Mime
View raw message