You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2009/08/29 03:59:03 UTC
osgi-ification progress
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.
thanks
david jencks
Re: osgi-ification progress
Posted by Rick McGuire <ri...@gmail.com>.
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.
Rick
>
> thanks
> david jencks
>
>