cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Smyth <andrea.sm...@iona.com>
Subject Re: Two better ideas for Spring Discovery
Date Thu, 12 Oct 2006 21:29:39 GMT
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:
>>
>> <bean class="...DestinationFactoryManager">
>> <constructor-arg>
>>  <bean class="org.apache.cxf.spring.DynamicMap">
>>    <property name="interfaceType" value="...DestinationFactory">
>>  </bean>
>> </bean>
>>
>> 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<String>) that implements the deferred activation via Namespaces.

Andrea.

Mime
View raw message