Clement Escoffier <[EMAIL PROTECTED]> writes:

>        try {
>            bundle = context.installBundle(loc);
>            out.println(loc + " is installed as " + bundle.getBundleId());
>        } catch (BundleException e) {
>            err.println("Failed to install " + loc + " : " + e.getMessage());
>            return;
>        }

On a related note, I can't figure out what happens if one tries to
install a bundle whose Symbolic Name and Version match an already
installed bundle, but differ in location string.

I'm considering a design where my client downloads bundles and tries
to install them, but doesn't know beforehand the downloaded bundle's
symbolic name or version. Hence the client has no way of knowing
(short of parsing the MANIFEST.MF file itself) the new/pending
bundle's identity to know whether it will clash with a bundle that's
already installed.

I understand that if the symbolic name and version match an existing
bundle, installing the new bundle should be indistinguishable from
just getting access to the existing bundle, but it would be nice to be
able to figure out via the installBundle() interface whether
installation fails due to a corrupted input source or due to a
conflict with an already installed bundle.

-- 
Steven E. Harris

Reply via email to