Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Upgrading Bundle
Upgrading Bundle [message #886628] Fri, 15 June 2012 10:11 Go to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Is it possible to upgrade a bundle, that is part of a scoped plan at runtime, without shutting down the entire plan ? Ideally I would have liked to be able to just make a change to my plan and have the change detected and the system would do the necessary changes (e.g. uninstall/install/refresh bundles). Are there any plans on implementing such behaviour or is there something that fundamentally prevents such a solution ?

Re: Upgrading Bundle [message #886634 is a reply to message #886628] Fri, 15 June 2012 10:34 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The closest thing we have to that function at the moment is the support that the tooling provides (although I haven't checked this still works now that the tooling has been overhauled) where a bundle of a PAR file can be updated without necessarily impacting the rest of the PAR. See the Deployer mxbean interface and look at the refresh operations (I forget which one is used for the PAR scenario).

It might be possible to get something working outside the tooling using this mechanism, but I'm not aware of anyone who has tried it.

There is nothing fundamentally intractable about providing that kind of function, but there are quite a few considerations which would make it interesting. Wink

For example, take scoping. Scoping involves determining referents (such as exported packages) in the scope and then transforming them and their references in the scope to tie each reference to its corresponding referent. If a bundle update changes the bundle's symbolic name or version or set of exported packages, then it is necessary to re-scope any references to these, which is quite messy. IIRC in such situations, we "escalate" and refresh the whole scoped plan.

Then there is the normal impact of a bundle update. This will impact any bundles which depend on the updated bundle. If the updated bundle exports any packages, the generated synthetic context bundle will be impacted. Impacted bundles need to be stopped and restarted around the refresh so that they "re-bind" to the new bundle. I think this all works, but it tends to complicate testing.

There is also bug 373554 when refreshing a bundle on Windows, even in a non-scoped plan. It's essentially a Windows bug, but one which doesn't seem to be going away. The solution in Virgo requires a rework of the kernel's file system support.

This would be a great area to improve, but would need careful development with plenty of additional tests. It's quite deeply embedded in the Virgo kernel and I suspect there are only currently one or two people who have the necessary in-depth knowledge. If anyone would like a challenge, however... Smile
Re: Upgrading Bundle [message #886688 is a reply to message #886634] Fri, 15 June 2012 12:51 Go to previous messageGo to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Thanks for the detailed respone Glyn.

I tried using the Deployer via the JMX-interface, and I refreshed a bundle that has no exports - and it still restarts the entire plan...

If I use Deployer.refresh(String uri, String symbolicName) the entire plan restarts.

If I use Deployer.refresh(String bundleSymbolicName, String bundleVersion) it fails and tells me there is no such artefact (the symbolic-name and version are correct).

[Updated on: Fri, 15 June 2012 13:23]

Report message to a moderator

Re: Upgrading Bundle [message #888643 is a reply to message #886688] Mon, 18 June 2012 12:14 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
If the plan is atomic, that would explain why the entire plan restarts when one of its bundles restarts. Is it atomic?
Previous Topic:P2 repository for Virgo Tomcat Server
Next Topic:Virgo Tomcat Server and Web Sockets
Goto Forum:
  


Current Time: Tue Apr 16 12:46:50 GMT 2024

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

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

Back to the top