Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 20883 invoked from network); 2 Jan 2008 22:19:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2008 22:19:06 -0000 Received: (qmail 25398 invoked by uid 500); 2 Jan 2008 22:18:55 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 25163 invoked by uid 500); 2 Jan 2008 22:18:54 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 25152 invoked by uid 99); 2 Jan 2008 22:18:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 14:18:54 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [194.109.24.37] (HELO smtp-vbr17.xs4all.nl) (194.109.24.37) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 22:18:43 +0000 Received: from [192.168.1.145] (adouma.demon.nl [82.161.89.203]) (authenticated bits=0) by smtp-vbr17.xs4all.nl (8.13.8/8.13.8) with ESMTP id m02MIZ7I082166 for ; Wed, 2 Jan 2008 23:18:35 +0100 (CET) (envelope-from ate@douma.nu) Message-ID: <477C0DBA.1060103@douma.nu> Date: Wed, 02 Jan 2008 23:18:34 +0100 From: Ate Douma User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Jetspeed Developers List Subject: Re: [RT] Spring Configuation References: <473DD2CF.8010501@apache.org> <059F1F6C0F6C8842B55E064DEB00138E077290BB@EXCHVS01.bcbsmamd.net> <4741CA6E.1010204@hippo.nl> <47438C44.9050201@douma.nu> <4748BED8.5060805@apache.org> <475D539B.1050304@apache.org> <475D7A70.3050901@douma.nu> <475E52F7.5050902@apache.org> In-Reply-To: <475E52F7.5050902@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org Carsten Ziegeler wrote: > Ate Douma wrote: >> Carsten Ziegeler wrote: >>> Ok, I'm back from vacation and thought about this a little bit more. I >>> think my old proposal (quoted below) is not needed and all we need is >>> something as Ate proposed: a xml schema extension for spring handling >>> conditionals. >>> >>> If noone has done looked into this yet, I'll have a look in the next >>> days if it's possible. >> That would be great! >> I haven't had time to further investigate and search for possibly >> already defined/discussed similar solutions (the spring forums especially). >> So you're more than welcome to dive into it Carsten :) >> > I searched a little bit but didn't find similar solutions yet (but I'll > continue searching). In the meantime I looked at the namespace handling > stuff in Spring again, and it seems that's impossible to implement > conditional bean definitions with a namespace. The only working way > would be to wrap each bean definition with a condition, like > > > > > > > > > > > > I looked into the Spring (2.5) custom NamespaceHandler feature this evening and I think it actually should be possible to wrap a bean definition, including with its own namespace handling, with a custom namespace. In a custom BeanDefinitionParser handling the condition logic you can "delegate" back parsing a nested bean definition as top level bean using the passed on ParserContext its BeanDefinitonParserDelegate. I don't have time left tonight to test this out, but I'll do that later this week or this weekend. If this works out as I expect, it should be easy to write an EL based condition namespace bean parser providing just the features we need. And if this holds true, I prefer to experiment with it from within the Jetspeed code base itself for now. Then, once all the features have been fleshed out and tested properly, we can see if we can promote it to a separate generalized Spring configuration tool like the Cocoon Spring Configurator, or maybe even better, contribute it back to Springframework itself if they are interested. Regards, Ate --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org