felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: newbie: installing and starting new bundles from code
Date Wed, 11 Apr 2007 20:08:43 GMT
Steven E. Harris wrote:
> Clement Escoffier <clement.escoffier@gmail.com> 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.
>   

There would be an install error, because symbolic name + version must be 
unique.

> 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.
>   

There is no way to know that from the exception except by reading the 
exception message.

-> richard

Mime
View raw message