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:05:07 GMT
See section in the spec:

"Its value is not reused for another bundle, even after a bundle is 


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

Eric Swindell <eric.swindell@att.net> 
2007-08-16 17:53
Please respond to


Re: [jira] Assigned: (FELIX-339) Ensure bundle identifiers never get 

I'm not sure I understand the issue.  The spec says that the framework is 
supposed to assign a unique identifier for the 'lifetime' of a bundle, 
if it is updated or the Framework is restarted."  The example provided in 
issue is that of 'uninstalling' a Bundle and restarting the framework. 

My interpretation is that if the Bundle is uninstalled, then its 
with respect to that framework has ended.  The spec uses the terms 
and 'restart' and does not explicitly state a requirement that bundle ids 
to be considered permanent long after those bundles are uninstalled. 

Therefore, I don't see a need to complicate the numbering scheme with 
unnecessary complexity.  Is the reasoning for this issue due to the 
on id consistency by external systems outside the framework?  Am I missing 

something here?


>      [

>gin.system.issuetabpanels:all-tabpanel ]
> Richard S. Hall reassigned FELIX-339:
> -------------------------------------
>     Assignee: Richard S. Hall
> > Ensure bundle identifiers never get reused
> > ------------------------------------------
> >
> >                 Key: FELIX-339
> >                 URL: https://issues.apache.org/jira/browse/FELIX-339
> >             Project: Felix
> >          Issue Type: Improvement
> >          Components: Framework
> >    Affects Versions: 1.0.0
> >            Reporter: Marcel Offermans
> >            Assignee: Richard S. Hall
> >
> > The spec states about a Bundle Identifier (see 4.3.1 of the core 
spec): A
> > long that is a Framework assigned unique identifier for the full 
> > of a bundle, even if it is updated or the Framework is restarted. Its
> > purpose is to distinguish bundles in a Framework. Bundle identifiers 
> > assigned in ascending order to bundles when they are installed. The
> > method getBundleId() returns a bundle's identifier. Currently, there 
is a
> > scenario in which an identifier might get reused. For example, say you
> > install three bundles, they will get ID's 1, 2 and 3. You then 
> > bundle 3 and subsequently stop the framework. After a restart, you
> > install another bundle. It will then also get an ID of 3. The reason 
> > this is that Felix currently does not persist the highest ID it has 
> > The solution would be to persist this identifier. If somehow this
> > persisted value gets corrupted, the framework should log at least a
> > warning and could then use the same scheme it uses now to at least 
> > an educated guess about the highest used number. A human might want to
> > check out such a warning though.

View raw message