Hi,

Am 12.04.2012 um 20:47 schrieb altijori:

> I have a unique situation in which we have a platform that is not extensible.
> All methods defined in the implementation classes are final. This platform
> is bundled as bundle1. 
> 
> There is a bundle2 that has a class that implements an interface located in
> bundle1. Bundle1 also has a class that implements the same interface from
> bundle1. 
> 
> Bundle1 class has the following configuration:
> /**
> * Bundle1Class
> * 
> * @scr.service
> * @scr.component immediate="true" name="com.bundle1.Bundle1"
> *                description="%vehicledataservice.description"
> * @scr.property name="service.description" value="Data Service."
> * @scr.property name="service.vendor" value="Bundles Corp"
> */
> 
> Bundle2 class has the following configuration:
> /**
> * Bundle2Class.
> * 
> * @scr.service
> * @scr.component immediate="true" name="com.bundle1.Bundle1"
> *                description="%vehicledataservice.description"
> * @scr.property name="service.description" value="Data Service."
> * @scr.property name="service.vendor" value="Bundle2 Corp"
> */

This component won't load because its name collides with the one in Bundle1.

> 
> Bundle1 loads before bundle2. We would like to programatically unregister
> the service from bundle1. Please let me know if it is feasible.

The only way to be able to load the component from Bundle 2 would be to stop 
bundle 1, which might cause bundle 2 to fail.

This is because component descriptors are loaded when bundles are started and 
the names of components must be unique on a system wide bases. Since the bundle 
2 component's name collides with the one of bundle 1 it will be ignored and an 
error message is logged.

Regards
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to