Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 1947 invoked from network); 4 Nov 2006 18:28:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Nov 2006 18:28:53 -0000 Received: (qmail 47493 invoked by uid 500); 4 Nov 2006 18:29:03 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 47272 invoked by uid 500); 4 Nov 2006 18:29:02 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 47248 invoked by uid 99); 4 Nov 2006 18:29:02 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO [127.0.0.1]) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Nov 2006 10:29:02 -0800 Message-ID: <454CDBD9.5000100@apache.org> Date: Sat, 04 Nov 2006 19:28:41 +0100 From: Carsten Ziegeler User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Restructuring directory structure[was [Vote] Block artifact directory structure] References: <45470272.1030905@apache.org> <4549ABBE.2000601@apache.org> <454BB06A.5040400@apache.org> <454BC985.30705@apache.org> <454BCBDB.8000807@apache.org> <454C8223.2040301@mobilebox.pl> <454C918F.8070504@apache.org> <454C9738.1070801@mobilebox.pl> <454C9CDC.4070107@mobilebox.pl> <454CA971.8040600@apache.org> <454CB0BC.70803@mobilebox.pl> In-Reply-To: <454CB0BC.70803@mobilebox.pl> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Leszek Gawron wrote: >>> To get things going: how do I get access to current cocoon running mode in: >>> - AvalonElementParser >>> - SitemapElementParser >>> >>> in order to pass it to ConfigurationReader? >> It seems my knowledge of Spring internals is lacking alot. Reading the >> code I would say maybe somthing line >> >> (Settings)(new RuntimeBeanReference(Settings.ROLE).getSource()) > > probably not, I need to access the bean itself - not the definition > metadata. I do not know if that is possible - after all the context > containing the settings bean is still in creation. > It's not possible to get the settings object in the element parser. Actually its not possible to access any bean in the parser (and its also not possible to get the ServletContext). I had a very hard time figuring a way out of this problem. And I came up with the current solution which registers special beans which do the work. So the parser only register beans, pass some configuration information to the beans, but the actual work is done in the beans when they are instantiated by Spring. HTH Carsten -- Carsten Ziegeler - Chief Architect http://www.s-und-n.de http://www.osoco.org/weblogs/rael/