karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <alex.s...@envieta.com>
Subject Re: Retrieve SCR factory component properties
Date Thu, 25 Aug 2016 18:07:59 GMT
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 <alex.soto@envieta.com> wrote:
> Hello,
> I need to do introspection on the properties of a factory SCR component defined in another
> 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

View raw message