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:55:14 GMT
Eric Swindell <eric.swindell@att.net> wrote on 2007-08-16 18:45:03:

> > It means forever. That is, that framework instance can never reuse a
> > bundle id. Regardless of the number of times the framework is 
> > The only conceivable way to reuse a bundle id would be to uninstall 
> > the bundles (and any persistent storage owned by those bundles) and 
> > you could restart at bundle id 1. But this is really no different than
> > throwing away the framework instance and starting with a fresh 
> The spec never mentions "eternity" :)  I mean, this isn't a religion. Or 
> it :)
> By "throwing away the framework instance and starting with a fresh 
> do you mean shuting down the framework instance and restarting it?  If 
> instance is gone, I'd consider it 'thrown away'.  If thrown away, then 
> stating that it doesn't matter what the bundle ids are when restarting 
> that they could restart at bundle id 1.

Perhaps instance is a poor term here. I mean the set of installed bundles 
and their associated persistent information. I don't know what Felix calls 
it, but Equinox calls it a configuration. I do not mean the runtime object 
of the framework.

> >
> > > It also states "This method must continue to return this bundle's 
> > >
> > > identifier while this bundle is in the UNINSTALLED state."
> >
> > This means that if the Bundle object is still reachable and the bundle 
> > represents is uninstalled, i.e. Bundle.getState() == 
> > then the Bundle.getBundleId must return the bundle's id. Once the 
> > object is unreachable, it does not really matter what the method 
> > since no one can call it :-)
> Right!  If the Bundle object is unreachable, then it doesn't matter.

It does not matter what that method returns. But it clearly matters that 
the bundle id is consumed and is not to be reused.

> In other 
> words, if I uninstall a Bundle and restart the framework ( 'throw 
itaway' in 
> your lingo ), then id consistency does not matter.

Per my statement above, restart framework != throwing away the framework's 
installed bundle set.

> Seems like we both agree that it is not within the spec :)

No. Don't think we agree that. Like all specs, none are perfect. But it is 
the intent of the spec authors that bundle ids are consumed and not reused 
by a given framework bundle set.



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