geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Blueprint, gbeans, and activemq
Date Mon, 08 Feb 2010 08:48:59 GMT
I've discovered that there's a timing problem using bueprint in  
geronimo.  Blueprint uses a separate thread to fire up the beans in a  
bundle, whereas geronimo uses the calling thread to start a  
configuration.  This means that if a gbean needs something supplied by  
a blueprint bean in an "earlier" configuration, there's no guarantee  
the blueprint stuff will have been processed at all yet.

A simple way to deal with this is with a WaitForBlueprintGBean that  
registers as a BlueprintListener and blocks until it gets a  
BlueprintEvent indicating that the blueprint stuff either started or  
failed to start.

While all comments are welcome, I'd appreciate it if Jarek or Rick  
could take a look to see if I missed any events that need to be  
considered.  The new class is framework/modules/geronimo-blueprint/src/ 

I put this in a new module since we may not want a dependency on  
blueprint-api for every module in geronimo.  The only other place that  
seems reasonable to me is geronimo-system but this will drag in  
blueprint everywhere.

Anyway.....  with the help of this gbean, slightly modified aries  
blueprint, xbean-blueprint, karaf modified to use aries blueprint, and  
a couple minor activemq changes to eliminate needless spring-isms, I  
appear to have an activemq broker starting up under blueprint, and our  
regular activemq-ra connector starting.  I plan to work on getting all  
these bits committed or into patches.

david jencks

View raw message