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
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.