|Re: Upgrading Bundle [message #886634 is a reply to message #886628]
||Fri, 15 June 2012 10:34
| Glyn Normington
Registered: July 2009
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...
Powered by FUDForum
. Page generated in 0.02132 seconds