geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick McGuire <>
Subject Re: osgi-ification progress
Date Tue, 01 Sep 2009 10:14:38 GMT
David Jencks wrote:
> I've been working on my sandbox framework copy on converting to use 
> osgi, and I've made some progress.
> My basic strategy has been to replace plugin classloader usage with 
> Bundle (and BundleContext) use.  This looks like it will work out ok.
> Most of the code compiles and unit tests pass and I'm to the point 
> where I have to figure out how to make a maven plugin fire up enough 
> of osgi to run bits of geronimo so we can build plugins, and how to 
> actually start stuff inside a real osgi framework.  So far I've mocked 
> up BundleContext and Bundle enough to run unit tests.
> I don't see any really major problems ahead, and the next steps look 
> pretty straightforward.
> The most annoying thing so far has been that in order to track 
> starting bundles a given bundle depends on in the 
> ConfigurationManager, I need to use a thread local since it pretty 
> much has to be a recursive process of starting bundles through 
> BundleContext rather than what we used to  do of computing the entire 
> tree and starting it depth first.  To do this now would involve too 
> much peeking inside bundles that might not even be using geronimo's 
> dependency mechanism.
Generally, that sort of processing is performed by a bundle repository 
such as OBR.  For each bundle loaded, it inspects the metadata and used 
the bundle repository metadata to calculate which bundles need to be 
started from the repository.  This will ensure that each bundle will 
resolve when started because all of its imports will be satisfied. 

You might want to look at Karaf for bootstrapping the OSGi framework and 
a bundle repository.  It looks like it has a lot of the core function 
we'd need to get the environment up and running and manage that 
environment.  And as Guillaume indicated, if there areas that need to be 
fixed or enhanced so it can be used for Geronimo, there's a general 
willingness to do that.

> thanks
> david jencks

View raw message