2

We are using Apache Felix OSGi Bundle Repository v1.6.4 in Apache Karaf. We are programmatically trying to deploy a bundle (say demo-bundle-2.0.0.jar) using obr mean. However another version of the demo-bundle (1.0.0) already exists. We have a requirement that both versions of the bundle should co-exist. However when 2.0.0 is installed, obr overwrites v1.0.0.

My question: Is this expected behavior? Is there any workaround so that both versions of the bundle can be available?

6ton
  • 4,174
  • 1
  • 22
  • 37
  • 1
    Some sample code, some manifests, or what your OBR metadata looks like would be helpful. Without that all I can say is that it looks like your Bundle-SymbolicName and Bundle-Version lines could be wrong, causing OBR to think demo-bundle-2.0.0.jar and demo-bundle-1.0.0.jar are the same bundle. EDIT: from this: http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html, "the OBR deployment algorithm tries to favor updating existing bundles, if possible, as opposed to installing new bundles to satisfy dependencies." – Sheena Artrip Jul 11 '13 at 13:31
  • +1 for Sheena's reply. Also, OBR will install only the bundles that are required to satisfy the input requirements. If those requirements are satisfiable by installing only one of the versions of demo-bundle then that's exactly what OBR will do (and it will favour the already-installed one). – Neil Bartlett Jul 11 '13 at 15:40

0 Answers0