cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject single instance per context on avalon components
Date Fri, 28 Sep 2001 16:09:36 GMT
Working for finishing up the gallery code, I've come into the need to
share the instance of an avalon component between two cocoon pipeline
components, respectively a transformer and a generator.

This is the same need of the FragmentExtractor generator/transformer
pair: one collects information at transformation stage and stores this
information for later retrieval at generation stage. It's not a common
need, but I assume this will turn out very useful for complex operations
like pagination and path expansion (which is why I need this).

So, my code compiles and does what it should: the problem is that the
two sitemap components (the generator and the transformer) get two
different instances of the component so one stores correctly and the
other retrieves correctly, the problem is that it never retrieves
anything since it's the other instance that gets filled with data :(

how do I share a component without using static methods?

(oh, BTW, the FragmentExtractor is buggy in that respect since it uses a
static hashtable instead of using a shared component, this could well
create problems on situations where more than one cocoon is run in the
same JVM! please, kill all static instances!)

Thanks much in advance.

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche

To unsubscribe, e-mail:
For additional commands, email:

View raw message