Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 71070 invoked from network); 12 Oct 2006 21:30:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 21:30:50 -0000 Received: (qmail 71117 invoked by uid 500); 12 Oct 2006 21:30:50 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 71088 invoked by uid 500); 12 Oct 2006 21:30:49 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 71079 invoked by uid 99); 12 Oct 2006 21:30:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 14:30:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andrea.smyth@iona.com designates 62.221.12.33 as permitted sender) Received: from [62.221.12.33] (HELO emea-smg1.iona.com) (62.221.12.33) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 14:30:49 -0700 Received: from emea-ems1.ionaglobal.com (dutec.ie [10.2.1.125]) by emea-smg1.iona.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k9CMTUlq007319 for ; Thu, 12 Oct 2006 22:29:55 GMT Received: from [10.2.15.8] ([10.2.15.8]) by emea-ems1.ionaglobal.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 12 Oct 2006 22:30:26 +0100 Message-ID: <452EB3C3.3010505@iona.com> Date: Thu, 12 Oct 2006 22:29:39 +0100 From: Andrea Smyth User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: cxf-dev@incubator.apache.org Subject: Re: Two better ideas for Spring Discovery References: <452E7BE7.1090607@envoisolutions.com> <452E8AC0.9070309@envoisolutions.com> In-Reply-To: <452E8AC0.9070309@envoisolutions.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Oct 2006 21:30:26.0339 (UTC) FILETIME=[A1EBFF30:01C6EE45] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dan Diephouse wrote: > Well crap that was only one idea. Forget the other idea... it was > using a BeanPostProcessor and I don't think its as good as this one... > - Dan > > Dan Diephouse wrote: > >> I've been asking a lot of people about better ways to discover >> components in Spring here at ApacheCon. Right now we kind of do the >> registerSelfWithBus() hack. Dain suggested that we write a >> ApplicationContextAware Collection, and I kind of like the idea. In >> this case we could do something like: >> >> >> >> >> >> >> >> >> In this case the DynamicMap would implement ApplicationContextAware >> which gives it access to the ApplicationContext. We can then search >> for all the types of "DestinationFactory" and add them to the >> collection. This is basically the extensionmanager applied to Spring >> I think. >> >> What do you think? >> >> - Dan >> > > Hi Dan, Not sure what the two alternatives here are - but getting rid of the register() methods in the extensions is definitely a good idea! BTW we already have sort of applied the ExtensionManager to Spring - it's a BeanFactoryPostProcessor (checks if a bean definition is lazy-init and has a property names activationNamespaces of type Collection) that implements the deferred activation via Namespaces. Andrea.