cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: question on getLogger()
Date Wed, 04 Apr 2001 05:07:11 GMT
On Tue, Apr 03, 2001 at 05:38:53PM -0400, Donald Ball wrote:
> On Tue, 3 Apr 2001, Giacomo Pati wrote:
> 
> > > what's the most succinct way of configuring the class so that getLogger()
> > > is valid and doesn't return null?
> >
> > You need to put your class under the controll of a ComponentManager by
> > defining it as a component in the cocoon.xconf file and getting it via
> > the ComponentManager. This depends where you are instanciating your
> > class. Can you elaborate more on the use case of your class?
> 
> i was just playing around thinking about caching issues and decided to go
> ahead and try using a LoggingEntityResolver to see if we can actually
> track "extra" resources used by sitemap components (trax transformer, for
> instance) using that method. i'm currently using it as follows in the
> ResourcePipeline:

be aware that I am currently refactoring the Resourcepieline class.

Giacomo 

> 
>             while ( transformerItt.hasNext() ) {
>                 Transformer trans = (Transformer)transformerItt.next();
>                 LoggingEntityResolver resolver = new
> LoggingEntityResolver((EntityResolver)environment);
>                 resolver.setLogger(log);
>                 trans.setup(
>                     resolver,
>                     environment.getObjectModel(),
>                     (String)transformerSourceItt.next(),
>                     (Parameters)transformerParamItt.next()
>                 );
>             }
> 
> and it works like a charm. the idea being that the ResourcePipeline can
> check not only the freshness of the original InputSource (if any) for a
> sitemap component, but the other resources upon which it depends. nothing
> fancy, but it does solve a long-standing problem.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch
                                          Web:   http://www.pwr.ch

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


Mime
View raw message