Architecture Question - Bundle manipulation [message #690966] |
Thu, 30 June 2011 13:35 |
Marco Gerber Messages: 10 Registered: May 2011 |
Junior Member |
|
|
Hello everybody
We have an OSGi application with a lot of bundles. Many of them are completely independent of each other, and others are chunked together.
By now, I'm looking for a way to manage these bundles from within a web application bundle (part of our application). For example, a user is able to see in what state the entire application is, so the state of every bundle must be visible. Also, a user should be able to install/launch bundles as needed from within the web application.
For this, I found the Application Admin Service as specified in the OSGi Compendium Specification [1]. So, here's the question:
How is it valid to manipulate the state of the bundles taking into account of the virgo bundle management by using an existing Application Admin Service such as the one provided by equinox [2]? I'm currently little confused about my understanding of where are the components already implemented, what components am I able to use and how are the responsibilities shared between my application and virgo.
The alternative way is to handle the bundle lifecycle by calling their bundle's context lifecycle methods. But using an Application Admin Service seems to be a general and more flexible way to meet the requirements.
My environment:
- Spring Dynamic Modules bundles
- Virgo
Regards,
Marco
[1] www.osgi.org/Download/File?url=/download/r4v42/r4.cmpn.pdf
[2] dz.prosyst.com/pdoc/mBS_EE/um/framework/bundles/equinox/equinox.html
|
|
|
Re: Architecture Question - Bundle manipulation [message #691006 is a reply to message #690966] |
Thu, 30 June 2011 14:30 |
Glyn Normington Messages: 1222 Registered: July 2009 |
Senior Member |
|
|
In general, managing bundles via the OSGi APIs can work in some selected situations, but any bundles installed that way will not be processed through Virgo's deployment pipeline. So, for example, import-bundle and import-library will not be expanded to package imports. So as a basic restriction, and there are probably others I haven't thought of, such bundles should contain only OSGi standard manifest headers.
However, we have been fairly careful to allow some of these scenarios to potentially work (not the guarded language here!). For instance, if you use the BundleContext of a bundle in the user region to install a bundle, the new bundle will also reside in the user region.
As for Application Admin, it's one of those corners of the compendium spec that hasn't had widespread use to my knowledge, so I can't vouch for the quality of any implementations or say how they will interact with Virgo. If you invest the time to experiment, I would love you to post or blog about your findings, as well as raising any bugs against Virgo as appropriate.
I hope that's some help at least!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03024 seconds