felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Swindell <eric.swind...@att.net>
Subject Re: [jira] Assigned: (FELIX-339) Ensure bundle identifiers never get reused
Date Thu, 16 Aug 2007 21:53:29 GMT
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, "even 
if it is updated or the Framework is restarted."  The example provided in the 
issue is that of 'uninstalling' a Bundle and restarting the framework.  

My interpretation is that if the Bundle is uninstalled, then its 'lifetime' 
with respect to that framework has ended.  The spec uses the terms 'update' 
and 'restart' and does not explicitly state a requirement that bundle ids are 
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 reliance 
on id consistency by external systems outside the framework?  Am I missing 
something here?

Eric

>      [
> https://issues.apache.org/jira/browse/FELIX-339?page=com.atlassian.jira.plu
>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 lifetime
> > of a bundle, even if it is updated or the Framework is restarted. Its
> > purpose is to distinguish bundles in a Framework. Bundle identifiers are
> > 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 uninstall
> > 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 for
> > this is that Felix currently does not persist the highest ID it has used.
> > 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 make
> > an educated guess about the highest used number. A human might want to
> > check out such a warning though.



Mime
View raw message