[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] bundle name x unique id
- From: Thomas Watson <tjwatson@xxxxxxxxxx>
- Date: Wed, 19 Nov 2003 13:32:35 -0600
- Delivered-to: email@example.com
Bundle-UniqueId has been changed to Bundle-GlobalName. Although this may
change again before it is finalized. The equinox code has not been updated
to reflect this change but will be shortly after M5. Along with some other
API method renames/changes.
Bundle-Name and Bundle-GlobalName are not synonyms. The semantics of
Bundle Name are unchanged. Bundle Name is meant to give a bundle a human
readable name but it does not mean anything to the Framework at runtime.
The Bundle-GlobalName and Bundle-Version values are used to uniquely
identify a bundle in the runtime Framework.
The equinox Framework currently lets a bundle change its Bundle-GlobalName
at update. During update the Framework must check to see if there is
already a bundle installed that has the same Bundle-GlobalName and
Bundle-Version as the newly updated bundle. For example, if the following
bundles are installed:
BundleA1: Bundle-GlobalName=com.foo.bundlea Bundle-Version=1.0
BundleA2: Bundle-GlobalName=com.foo.bundlea Bundle-Version=2.0
And then BundleA1 is updated to have Bundle-GlobalName=com.foo.bundlea and
Bundle-Version=2.0, then a BundleException is thrown because a bundle
(BundleA2) is already installed with identical Bundle-GlobalName and
I am reluctant to require another check during update to make sure that the
newly updated bundle has not changed its Bundle-GlobalName. It is unclear
to me what the disadvantages are to allowing this kind of operation. The
operation is basically uninstalling the old Bundle-GlobalName and
installing a new different one.
This type of operation has been allowed in previous versions of the OSGi
spec. A bundle may be updated to a completely different bundle.
Phone: 512-838-4533 Tie: 678-4533
<Rafael_Chaves@ca. To: equinox-dev@xxxxxxxxxxx
Sent by: Subject: [equinox-dev] bundle name x unique id
In the RFC, are bundle names and unique ids synonyms?
I would say that they shouldn't be synonyms. That would allow us to keep
the loose semantics of bundle-name and restrict the semantics of the new
bundle-unique-id. For instance, I don't think an object should be able to
change its id. So it would make sense to allow changing a bundle's name
during an update operation, but not its unique id.