dev@glassfish.java.net

Re: [Fwd: Package.getImplementationVersion method in OSGi bundle]

From: Sahoo <Sahoo_at_sun.com>
Date: Fri, 22 Aug 2008 09:36:51 +0530

Richard S. Hall wrote:
> Bill Shannon wrote:
>> Richard S. Hall wrote:
>>> This is something that Sahoo brought up within Felix.
>>>
>>> One issue is that Felix doesn't currently handle this the way that
>>> Sahoo had envisioned. In Felix we actually tried to map the OSGi
>>> version information into the Package information; thus, we ignored
>>> any other manifest entries relating to this.
>>>
>>> Sahoo has reported that he would prefer it if Felix simply obeyed
>>> the manifest entries for the Package metadata and did not try to map
>>> OSGi metadata into it. Currently, this is an RFE at Felix which I am
>>> looking into.
>>>
>>> I see no reason why both cannot be supported, since OSGi, by default
>>> ignores the Package entries. However, the OSGi spec doesn't mandate
>>> any behavior in this area so it is not clear that you can 100% rely
>>> on it being the same on every framework.
>>
>> Why wouldn't we just create the OSGi manifest entries *and* the Package
>> manifest entries, some of which would have the same values? The
>> implementations
>> reading the entries don't *need* to cooperate at all.
>
> Right, that was what I was trying to say. But the other point remains,
> you cannot guarantee that framework implementations will process the
> Package entries, so if you want to see those entries when you are
> running as a bundle, then you are at the mercy of the framework impl.
More information is available at
https://issues.apache.org/jira/browse/FELIX-682

I sincerely feel every OSGi framework should be required to process the
jar entries standardized by JRE.

Thanks,
Sahoo