Hi
Using latest SCR and ConfigurationAdmin together, I have some troubles with
service registration. When component does not provide any service, all seem to
work properly. But when component provides a service, the ManagedService
doesn't seems to be registered so component is not called when associated
configuration is updated. Is it a known issue?
Here is code snippet is case I'm doing something wrong:
package x.y.z;
public interface Test { ... }
package x.y.z.impl;
public class TestImpl implements Test {
protected void activate(ComponentContext context) { ... }
protected void deactivate(ComponentContext context) { ... }
}
<component name="x.y.z.Test">
<implementation class="x.y.z.impl.TestImpl" />
<service>
<provide interface="x.y.z.Test" />
</service>
</component>
I also tried to declared both Test and ManagedService as provided interface:
<component name="x.y.z.Test">
<implementation class="x.y.z.impl.TestImpl" />
<service>
<provide interface="x.y.z.Test" />
<provide interface="org.osgi.service.cm.ManagedService" />
</service>
</component>
It seems to work but it generates warn message during Configuration.update()
"Service null is not a ManagedService". Does any body can explain this? Doesn't
ManagedService interface supposed to be registered implicitly by SCR?
Thanks in advance