On 4/7/10 16:41, jspeton wrote:
According to this bug https://cwiki.apache.org/jira/browse/FELIX-1795
bundle-version support in Fragment-Host header should work as of 2.0.2, yet
it is not being honored for me.

Here is my situation:
1. Two bundle hosts, with the same symbolic name, but with different
versions 1.6.1 and 1.6.2.
2. Two bundle fragments, with the same symbolic name, and with the same
symbolic name fragment host from (1).  The bundle-version of the two
fragments is 1.6.1 and 1.6.2 (they are kept in sync to avoid confusion).

In other words, I am expecting that version 1.6.1 of the host will resolve
the 1.6.1 fragment, and the 1.6.2 host will resolve the 1.6.2 fragment.

What I am finding is that the 1.6.2 fragment is resolving to both the 1.6.1
and 1.6.2 hosts.  I know the 1.6.1 class loader is correct, as is the 1.6.2,
but using getResourceAsStream from either host always gets me the 1.6.2
version.  Both bundle-version parameters are expressed as single versions,
e.g. bundle-version="1.6.2", although I have tried "[1.6.2,1.6.2]" as well
to no avail.

Am I doing something wrong or is this feature still bugged?  Why is the
1.6.2 fragment in the classpath of the 1.6.1 classloader?

What is the version range in your Fragment-Host header? If your fragments match both hosts, then the resolver will try to attach the highest version fragment to each host. This is correct. If you only want your fragments to attach to a specific host version, then your Fragment-Host header should only match that version.

-> richard

Many thanks!
Jean-Guy Speton

Reply via email to