Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 18641 invoked by uid 500); 28 Sep 2001 16:08:13 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 18617 invoked from network); 28 Sep 2001 16:08:12 -0000 Message-ID: <3BB4A0C0.C1AEA3DD@apache.org> Date: Fri, 28 Sep 2001 18:09:36 +0200 From: Stefano Mazzocchi X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Cocoon Subject: single instance per context on avalon components Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org