Hi,

the framework implementation does not have more info, the api is designed such that bundles ask for services - so the information which service is consuming another service is not available.

If you are using declarative services, I think the DTOs will provide you that information and you can do the reverse lookup.

Regards
Carsten

Am 16.07.2020 um 21:03 schrieb Konrad Windszus:
Hi,
it seems that currently in the Web Console one can only track service 
references in one direction (from consumer to provider).
Is there a way to see for a particular service which components/classes are 
currently using that service?

That would be very helpful fo debugging purposes.

Is there an API in OSGi for that?
I only found 
https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/framework/ServiceReference.html#getUsingBundles--
 which seems pretty coarse.
But maybe one could use Felix internal API for getting that on a more 
finegrained level....

WDYT?
Konrad






--
--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to