Eric Swindell <[EMAIL PROTECTED]> 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 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. > > The spec never mentions "eternity" :) I mean, this isn't a religion. Or is > it :) > > By "throwing away the framework instance and starting with a fresh instance", > do you mean shuting down the framework instance and restarting it? If the > instance is gone, I'd consider it 'thrown away'. If thrown away, then you're > stating that it doesn't matter what the bundle ids are when restarting and > 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 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 :-) > > 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 [EMAIL PROTECTED] office: +1 386 848 1781 mobile: +1 386 848 3788
