| ServiceTracker and DS combined? [message #1106872]
||Wed, 11 September 2013 12:58
| David Morales
Registered: September 2013
Let's imagine a bundle in which exists:
> A component is responsible of listen all "Device" service instances in the service registry.
> The same component needs an "adaptor factory" in order to create "Adaptors" by using the discovered devices.
> The factory is owned by another bundle.
I can solve part of the problem by using a ServiceTracker (Activator + Service Tracker): the activator instantiates the ServiceTraker and it can register all changes in "Device" services.
But i can't inject to this service tracker the DS factory created in other bundle, because it will result in two instances (one created by activator AND without the member /// another created by osgi AND with member variable ok but can't listen the "Device" service changes).
So... how can i solve this scenario? How can i have a Service Tracker (perfect for me) with a DS as a class member?
Powered by FUDForum
. Page generated in 0.14533 seconds