What I'd like to do is create a "launcher" framework for my code that, given a URL and a predefined versioning scheme: 1) go check if an update exists 2) download the updates 3) "install" the update 4) "re-run" the application
I want to a) do all of this inside of the existing JVM and b) be platform independent. Tall order right? Based on my (limited) knowledge of OSGi and Apache Felix I'm pretty sure this is possible, but I'm really getting lost in the details.
Checking for an update and downloading it is trivial. Causing the "old" bundle to unload and the "new" bundle to load is where I'm getting stuck. I've done OSGi work in the past but it was a lot less dynamic than this. A good starting place or a hard shove in the right direction would be most appreciated.
If I'm seriously over-baking something that's already been solved with a free library then tell me this too, but I haven't found anything so far. :-)
you can check well-known provisioning solutions that can do all your steps instead of you (check for a new version, download, install/update, restart etc.)
best regards, Dmytro
You don't even need to download it, just check if an update is available and then call Bundle.update(InputStream) on the bundle that needs to be updated, generally followed by a call to PackageAdmin.refreshPackages() afterward.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With