You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2008/10/24 14:44:53 UTC

[2.2] CacheableProcessingComponent problems with transformer

Hi all, 

I have a weird problem and no clue why that is happening .

I wrote a new implementation of some transformer that we had and using
it in 2.1. and 2.2.

In regards to the caching the transformer is working very fine in 2.1
but as soon as I use it as 2.2. block it does not cache at all.

It goes setup(), startDocument() in a 2.2. env but in a 2.1 it does
correctly the usual setup(), getKey(), ..., startDocument().

The code can be found 
https://svn.apache.org/repos/asf/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block

Further the prior version of the code
https://svn.apache.org/repos/asf/forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/ is working with caching without any problem.

Both classes are declaring:
public class DispatcherTransformer extends AbstractSAXTransformer
implements Disposable, CacheableProcessingComponent, URIResolver {
...
}

I have no clue why suddenly the CacheableProcessingComponent part seems
to be ignored.

Does somebody has a tip since it is driving me nuts?

TIA for any thoughts.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: [2.2] CacheableProcessingComponent problems with transformer

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Fri, 2008-10-24 at 14:44 +0200, Thorsten Scherler wrote:
> Hi all, 
> 
> I have a weird problem and no clue why that is happening .
> 
> I wrote a new implementation of some transformer that we had and using
> it in 2.1. and 2.2.
> 
> In regards to the caching the transformer is working very fine in 2.1
> but as soon as I use it as 2.2. block it does not cache at all.
> 
> It goes setup(), startDocument() in a 2.2. env but in a 2.1 it does
> correctly the usual setup(), getKey(), ..., startDocument().

To answer my own mail, I found out why and I have been VERY BLIND.

I am using a transformer and if we never check the get key of it can
mean that the prior step already is not cacheable. That was the case in
my test scenario where the generator was not caching at all so the
transformer as well have not been cacheable. 

salu2

> 
> The code can be found 
> https://svn.apache.org/repos/asf/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block
> 
> Further the prior version of the code
> https://svn.apache.org/repos/asf/forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/ is working with caching without any problem.
> 
> Both classes are declaring:
> public class DispatcherTransformer extends AbstractSAXTransformer
> implements Disposable, CacheableProcessingComponent, URIResolver {
> ...
> }
> 
> I have no clue why suddenly the CacheableProcessingComponent part seems
> to be ignored.
> 
> Does somebody has a tip since it is driving me nuts?
> 
> TIA for any thoughts.
> 
> salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)