>>>>> Jean-Baptiste Onofré <
[hidden email]>:
> Of course it depends a lot of the bundles and the code you are doing,
> but from a Karaf perspective you can deploy same bundle with different
> versions in a single instance without problem (as soon as the headers
> are good enough).
> I can add an example in Karaf distribution to show this if you want.
One thing that has bitten me, is wrap'ing of non-bundle jars. I.e. in
particular one none-bundle: javax.inject.
If I get an wrap'ed javax.inject, the resulting bundle gets version 0
and this seems to take precedence over actually versioned bundles...?
The place where it bit me was jersey's HK2's scanning for resources,
where it didn't find the @Inject annotations on resources (HK2 has its
own bundled version of javax.inject.
The fix for me was to examine all transitive dependencies in
"mvn dependency:tree" for javax.inject and exclude it everywhere I
found it so that I didn't get any features trying to load it as a
wrap'ed jar.
Properly versioned javax.connect bundles hasn't created any problems for
me.
E.g. the feature for the PostgreSQL JDBC driver relies on the built-in
karaf feature transaction-api, which pulls in
48 │ Active │ 80 │ 1.0.0.2 │ Apache ServiceMix :: Bundles :: javax.inject
and this doesn't create any problems for
136 │ Active │ 80 │ 2.28.0 │ jersey-inject-hk2