Looks like the factory property “service.bundleid” contains the id of the bundle declaring the factory component. I am not sure if this is part of the standard, but seems to be working for me.
Best regards, Alex soto > On Aug 25, 2016, at 12:24 PM, Alex Soto <[email protected]> wrote: > > Hello, > > I need to do introspection on the properties of a factory SCR component > defined in another bundle. > The component is declared with annotation: > > @Component(factory = “my-factory”, property = “path=abc") > > I was able to look up and obtain access to its factory instance > (org.osgi.service.component.ComponentFactory), but I need to be able to > inspect the actual component properties, for example to obtain the value > “abc” of property “path”. > > I am thinking to use ServiceComponentRuntime.getComponentDescriptionDTO, but > it asks for the bundle defining the component, and I don’t know this. > > Is there any way to do this other than iterating all bundles? I have a > suspicion that the factory should provide some information. I wonder if the > ID of the bundle defining the component is in any of the factory properties. > Anybody knows? > > Best regards, > Alex soto > > >
