Lachlan Paterson wrote:

Ok, I got it:

My class is a generator so it was inheriting from AbstractGenerator which inherits from AbstractXMLProducer which implements Recyclable, but I also was implementing CacheableProcessingComponent on my own. I removed the CacheableProcessingComponent stub code and then it was fine.

I had started writing this generator by looking at this example:
http://cocoon.zones.apache.org/daisy/documentation/writing/sitemapcomponents/688.html

which says to implement CacheableProcessingComponent. It seems that was wrong.

This tutorial was a better place to start:
http://cocoon.apache.org/2.1/tutorial/tutorial-generator.html

Hmm, I don't think that is right; it's entirely natural to inherit from AbstractGenerator (or it's sub-classes, e.g. ServiceableGenerator), and implement CacheableProcessingComponent, which itself doesn't clash with any of the lifecycle interfaces.

It is the implementation of AbstractXMLProducer of the Recyclable interface (a sub-interface of Poolable) which is your problem; this means that you can't then declare implementations of any other lifecycle interface (or sub-interface) out of SingleThreaded, ThreadSafe or Poolable.

Now you've never actually told us the signature of your Generator(!), so I'm guessing that you had something like:

public class FooGenerator extends AbstractGenerator implements ThreadSafe {}

or something, which would conflict with the Poolable/Recyclable interface already declared at the AbstractXMLProducer level.

Basically, the inheritance means that you cannot have a ThreadSafe or SingleThreaded Generator, at least not one that inherits from AbstractXMLProducer, although you could implement one using the individual Generator and XMLProducer interfaces.

In any case CacheableProcessingComponent is absolutely NOT incompatible with AbstractXMLProducer, in fact it's pretty damn important as far as Cocoon caching is concerned!

Ellis.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]