On Apr 11, 2007, at 4:34 PM, Steven E. Harris wrote:

"Richard S. Hall" <[EMAIL PROTECTED]> writes:

You can give the bundle any arbitrary location you want and use
installBundle(String, InputStream)...this is what the OBR impl does,
since it doesn't want the location is actually meaningless.

That doesn't make sense..."since the location is actually meaningless"...

But based upon the interface contract of installBundle() as described
by Mr. Hargrave, the location string is perhaps meaningless but must
remain strongly correlated to a particular symbolic-name/version
pair. He said that trying to install a bundle whose symbolic name and
version match an already installed bundle must fail if the location
string differs from the one used by the previously installed bundle.

That is not true...there is no correlation between location string and symbolic name/version.

Yes, if you try to install a bundle with a symbolic name/version it will fail, no matter what the location string is. However, if you update a bundle, it can update the bundle any symbolic name/version (except those which are already installed).

Does this location string match requirement not apply to the
installBundle(String, InputStream) overload?

Again, symbolic name/version must be unique for all installed bundles, this has nothing to do with location strings.

However, two bundles cannot have the same location string, thus location strings uniquely identify an installed bundle, but this is totally unrelated to the symbolic name/version of the bundle.

To summarize:

You cannot install two bundles with the same location string.
You cannot install two bundles with the same symbolic name/version.

The two statements are independent of each other.


What you need is to check to see if the symbolic name + version is
already installed.

Right, but what if I don't know the symbolic name and version of the
candidate bundle? It sounds like I'd have to parse the MANIFEST.MF
file myself first to get the candidate bundle's symbolic name and
version.

If you wanted to be sure that it wouldn't fail for this reason, then yes you would have to. But what is the point? It could fail for other reasons too, so are you going to check all of those reasons in advance too?

-> richard

Reply via email to