Augusto Sellhorn wrote:So a nice feature of OSGi is the ability to manage multiple versions of modules at the same time. However, when we install new bundles in our container, every time we increment the version id (say from an mvn url) a new bundle is installed.
So if I had bundle example.bundle.A, version 1.0.0.0
And the install bundle example.bundle.A, version 1.0.0.1
I now have two bundle.As in my environment.
Is there a way to do this in place? That is, update that same bundle (by id maybe?) but replace the old version with the new one, while also preserving the same bundle id (and install order in the container).
I have the same question about features, but kind of curious first at the bundle level.
Richard S. Hall wrote:
Augusto Sellhorn wrote:So a nice feature of OSGi is the ability to manage multiple versions of modules at the same time. However, when we install new bundles in our container, every time we increment the version id (say from an mvn url) a new bundle is installed.
So if I had bundle example.bundle.A, version 1.0.0.0
And the install bundle example.bundle.A, version 1.0.0.1
I now have two bundle.As in my environment.
Is there a way to do this in place? That is, update that same bundle (by id maybe?) but replace the old version with the new one, while also preserving the same bundle id (and install order in the container).
I have the same question about features, but kind of curious first at the bundle level.
BundleContext.installBundle() is how you install a new bundle.
Bundle.update() is how you update an existing bundle.
Augusto Sellhorn wrote:
On to the next, related question, are features part of the OSGi standard? And for features, I don't see an equivalent to update ...
Augusto Sellhorn wrote:Actually I am using karaf, so yeah, karaf has a feature:install command (and features have a version) but I don't really see how you can do an update of a feature. I got the impression features were not officially in the spec, but I thought they were a common feature of other containers too (like equinox and felix).
Augusto Sellhorn wrote:Actually I am using karaf, so yeah, karaf has a feature:install command (and features have a version) but I don't really see how you can do an update of a feature. I got the impression features were not officially in the spec, but I thought they were a common feature of other containers too (like equinox and felix).
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |