|
Re: Upgrading Bundle [message #886634 is a reply to message #886628] |
Fri, 15 June 2012 10:34 |
Glyn Normington 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.
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...
|
|
|
Re: Upgrading Bundle [message #886688 is a reply to message #886634] |
Fri, 15 June 2012 12:51 |
Johan Eriksson 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02907 seconds