All other things being equal, it will choose the highest version. If,
however, a lower version was already resolved and in use, then it will
choose the already in use version to avoid creating another incompatible
class space.
-> richard
Saminda Abeyruwan wrote:
Hi Devs,
I've read the OSGi spec to find out the version resolution to the following
scenario. Unfortunately I wouldn't find a proper solution. Please aid me
with this.
Scenario :
In bundle A, it needs to import class : foo.bar.Bar;version="[1.0, 2.1)"
In the system, it has installed and started two bundles exporting the prior
class
bundle B exports : foo.bar.Bar;version="1.2"
bundle C exports : foo.bar.Bar;version="2.0"
If bundle B and C is installed and started, and if bundle A started
thereafter, what is the version of f"oo.bar.Bar" class resolved to. I'm
facing a ClassCastException with the prior scenario. Your hint will aid me
to resolve the prior problem.
Thank you
Saminda