You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chitharanjan Das <cd...@accordiasys.com> on 2002/02/12 22:00:57 UTC

RE: How do i disable caching for Transformers - Please help...

Hello Vadim,
	Thank U for your help...
My question is quite different though....

I have developed a transformer by name StringTransformer, which attempts
to get hold of the XML String, perform some logic transformation via
different logic beans and pass the converted stream down the pipeline


During testing, I am modifing the code and restarting the webserver.....

To disable caching of objects I did the following

  <!-- Storing:
    maxobjects: Indicates how many objects will be hold in the cache.
                When the number of maxobjects has been reached. The
                last object in the cache will be thrown out.
    filesystem: Turns the filesystem storage for objects on or off.
  -->
  <store class="org.apache.cocoon.components.store.MRUMemoryStore"
logger="root.store">
     <parameter name="maxobjects" value="100"/>
     <parameter name="filesystem" value="false"/>
  </store>

I presume that the above will disable the storing of objects...


I then restart the webserver and test the pipe-line again


In the log file , I get the following message..

DEBUG   (2002-02-12) 09:28.19:360   [cocoon  ] (/accordia/tsttr)
HttpProcessor[8080][4]/DefaultPool: Retrieving a
com.accordia.display.transformation.StringTransformer from the pool
 --- WHY IS THIS , Do this mean it was restored from Cache ?


DEBUG   (2002-02-12) 09:28.19:791   [cocoon  ] (/accordia/tsttr)
HttpProcessor[8080][4]/DefaultPool: Returning a
com.accordia.display.transformation.StringTransformer to the pool
	-- Does this mean, This will be cached eventually ?


What 



-----Original Message-----
From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net] 
Sent: Tuesday, February 12, 2002 9:27 AM
To: cocoon-users@xml.apache.org
Subject: RE: How do i disable caching for Transformers.......

Transformers are not cacheable by default.

Read Cacheable.java from the org.apache.cocoon.caching package, see
TraxTransformer.java (or others implementing Cacheable) for examples of
cacheable transformers.

Vadim

> From: Chitharanjan Das [mailto:cdas@accordiasys.com]
> 
> How do I disable caching for the transformers?
> 
> I am experimenting with transformers and I am not able to remove
objects
> cached for transformers.
> To disable caching I did the following..
> 
> In cocoon.xcomf, I enabled the non caching event pipeline
> 	<event-pipeline
>
class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>
> 
> 
> I then restarted Cocoon and still in log file I get the info
> 
> DEBUG   (2002-02-12) 01:57.54:730   [cocoon  ] (/accordia/tsttr)
> HttpProcessor[8080][4]/DefaultPool: Retrieving a
> com.accordia.display.transformation.StringTransformer from the pool
> 
> How can I disable caching ? or how do I delete cached objects ?
> 
> The only way I am able to test is by changing the transformer names in
> site-map for each run, which is kind a pain....
> 
> Could any one of you please, provide a small note on cache options for
> Cocoon for Generators, Actions , Transformers etc.,
> 
> Thanks in advance,
> Chiths


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: How do i disable caching for Transformers - Please help...

Posted by giacomo <gi...@apache.org>.
On Tue, 12 Feb 2002, Chitharanjan Das wrote:

> Hello Vadim,
> 	Thank U for your help...
> My question is quite different though....
>
> I have developed a transformer by name StringTransformer, which attempts
> to get hold of the XML String, perform some logic transformation via
> different logic beans and pass the converted stream down the pipeline
>
>
> During testing, I am modifing the code and restarting the webserver.....
>
> To disable caching of objects I did the following
>
>   <!-- Storing:
>     maxobjects: Indicates how many objects will be hold in the cache.
>                 When the number of maxobjects has been reached. The
>                 last object in the cache will be thrown out.
>     filesystem: Turns the filesystem storage for objects on or off.
>   -->
>   <store class="org.apache.cocoon.components.store.MRUMemoryStore"
> logger="root.store">
>      <parameter name="maxobjects" value="100"/>
>      <parameter name="filesystem" value="false"/>
>   </store>
>
> I presume that the above will disable the storing of objects...
>
>
> I then restart the webserver and test the pipe-line again
>
>
> In the log file , I get the following message..
>
> DEBUG   (2002-02-12) 09:28.19:360   [cocoon  ] (/accordia/tsttr)
> HttpProcessor[8080][4]/DefaultPool: Retrieving a
> com.accordia.display.transformation.StringTransformer from the pool
>  --- WHY IS THIS , Do this mean it was restored from Cache ?

Cache and Pool are different things! Cache holds produced pipeline
output, Pools hold component to prevent instantiation and garbage
collection cycles.

So, Transformers get pooled because they are not thread safe.

Giacomo

>
>
> DEBUG   (2002-02-12) 09:28.19:791   [cocoon  ] (/accordia/tsttr)
> HttpProcessor[8080][4]/DefaultPool: Returning a
> com.accordia.display.transformation.StringTransformer to the pool
> 	-- Does this mean, This will be cached eventually ?
>
>
> What
>
>
>
> -----Original Message-----
> From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> Sent: Tuesday, February 12, 2002 9:27 AM
> To: cocoon-users@xml.apache.org
> Subject: RE: How do i disable caching for Transformers.......
>
> Transformers are not cacheable by default.
>
> Read Cacheable.java from the org.apache.cocoon.caching package, see
> TraxTransformer.java (or others implementing Cacheable) for examples of
> cacheable transformers.
>
> Vadim
>
> > From: Chitharanjan Das [mailto:cdas@accordiasys.com]
> >
> > How do I disable caching for the transformers?
> >
> > I am experimenting with transformers and I am not able to remove
> objects
> > cached for transformers.
> > To disable caching I did the following..
> >
> > In cocoon.xcomf, I enabled the non caching event pipeline
> > 	<event-pipeline
> >
> class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>
> >
> >
> > I then restarted Cocoon and still in log file I get the info
> >
> > DEBUG   (2002-02-12) 01:57.54:730   [cocoon  ] (/accordia/tsttr)
> > HttpProcessor[8080][4]/DefaultPool: Retrieving a
> > com.accordia.display.transformation.StringTransformer from the pool
> >
> > How can I disable caching ? or how do I delete cached objects ?
> >
> > The only way I am able to test is by changing the transformer names in
> > site-map for each run, which is kind a pain....
> >
> > Could any one of you please, provide a small note on cache options for
> > Cocoon for Generators, Actions , Transformers etc.,
> >
> > Thanks in advance,
> > Chiths
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>