Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » ServiceTracker and DS combined?
icon8.gif  ServiceTracker and DS combined? [message #1106872] Wed, 11 September 2013 12:58
David Morales is currently offline David Morales
Messages: 1
Registered: September 2013
Junior Member
Hi everybody,

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?




Previous Topic:getBundleContext() isn't returning Bundle's context classloader
Next Topic:Loading class from extension point
Goto Forum:
  


Current Time: Thu Apr 17 05:53:18 EDT 2014

Powered by FUDForum. Page generated in 0.01453 seconds