Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Architecture Question - Bundle manipulation
Architecture Question - Bundle manipulation [message #690966] Thu, 30 June 2011 13:35 Go to next message
Marco Gerber is currently offline Marco GerberFriend
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 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
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!
Re: Architecture Question - Bundle manipulation [message #691430 is a reply to message #691006] Fri, 01 July 2011 12:57 Go to previous message
Marco Gerber is currently offline Marco GerberFriend
Messages: 10
Registered: May 2011
Junior Member
Hi Glyn

Thanks for your reply. I also had the impression that the App Admin isn't widespread enough to be used in standard applications. It's a pity, because I believe many of the OSGi related projects have such problems where the app admin would be able to solve them. Yea, I will use the BundleContext to manage my bundles from within the application. Independent of this, if I have the time, I'll play around with one of the two or three implementations currently available.

Cheers,
Marco
Previous Topic:Weird fragment deployment behaviour
Next Topic:Analyzing Java Heap memory usage- Virgo,Karaf bundled with Activemq
Goto Forum:
  


Current Time: Fri Dec 19 08:05:12 GMT 2014

Powered by FUDForum. Page generated in 0.03269 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software