Hi all,

Issue FELIX-354 ([1]) complains, that the ServiceReference properties of
services registered through the SCR do not always contain the
service.pid property. In the Felix implementation, this property is
currently only set if the Configuration Admin service can provide
configuration to the component with the component name used as the PID
because the Configuration Admin service has to set the service.pid in
the configuration (if configuration exists).

So, this leaves us with a strange situation:

(1) For services not registered through SCR, the service.pid is of
course only set if the registrar sets the property.
(2) For services registered through SCR, the service.pid property is set
if configuration exists in the Configuration Admin for the service. In
addition these services have the component.name property set.

While the first case is completely outside of our control (which is
good), I am not sure about the second one: I would like to have the SCR
add the service.pid property to the service registration (if not set
through other means, e.g. the component properties). According to the
spec, the SCR only adds the component.id and component.name properties.

I wonder, whether it is ok to modify the SCR like this ?

Or should we rather extend the maven-scr-plugin to generate the
service.pid property automatically from the component name (if not
explicitly set by the user, which would probably not be a good idea) ?

What do you think ?

Regards and Thanks
Felix

[1] https://issues.apache.org/jira/browse/FELIX-354

Reply via email to