felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BJ Hargrave <hargr...@us.ibm.com>
Subject Re: [jira] Assigned: (FELIX-339) Ensure bundle identifiers never get reused
Date Thu, 16 Aug 2007 22:34:41 GMT
Eric Swindell <eric.swindell@att.net> wrote on 2007-08-16 18:25:27:

> Thanks for the clarification.  It's actually 

Uhhh, not in the latest version, 4.1, of the spec :-)

> Your quote of the spec still does not say anything about uninstall and 
> restart.  One question here is whether 'uninstalled' means existing with 
> UNINSTALLED state or uninstalled as in it was uninstalled and the 
> was restarted.

It means forever. That is, that framework instance can never reuse a 
bundle id. Regardless of the number of times the framework is restarted. 
The only conceivable way to reuse a bundle id would be to uninstall ALL 
the bundles (and any persistent storage owned by those bundles) and then 
you could restart at bundle id 1. But this is really no different than 
throwing away the framework instance and starting with a fresh instance.

> It also states "This method must continue to return this bundle's unique 

> identifier while this bundle is in the UNINSTALLED state." 

This means that if the Bundle object is still reachable and the bundle it 
represents is uninstalled, i.e. Bundle.getState() == Bundle.UNINSTALLED, 
then the Bundle.getBundleId must return the bundle's id. Once the Bundle 
object is unreachable, it does not really matter what the method returns 
since no one can call it :-) 

But the framework instance it still not allows to reuse the bundle id.

> Seems like either 
> the language here could have been clearer or perhaps the requirementwas 
> of UNINSTALLED state, e.g. if you uninstall a Bundle, that Bundle id is 
> to be reused with the running Framework versus bundle ids are permanent 
> unique identifiers which remain unique even after a bundle is 
uninstalled and 
> the Framework instance is terminated.

The latter.

> Eric
> On Thursday 16 August 2007 05:05:07 pm BJ Hargrave wrote:
> > See section in the spec:
> >
> > "Its value is not reused for another bundle, even after a bundle is
> > uninstalled."


BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance

office: +1 386 848 1781
mobile: +1 386 848 3788

View raw message