karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <alex.s...@envieta.com>
Subject Retrieve SCR factory component properties
Date Thu, 25 Aug 2016 16:24:47 GMT
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




Mime
View raw message