Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
scr-2.2.6
-
None
-
None
Description
I have a scenario, where I use constructor injection and on one of the references I get an update method is defined. When the properties of the registered service change the update method is never called however.
When I move the Reference from the constructor to a usual bind method, or even with a duplicated on it works like a charm.
The Constructor looks as follows:
public DefaultResourceSetFactoryComponent(ComponentContext ctx, @Reference(name="resourceFactoryRegistry", unbind="unsetResourceFactoryRegistry", updated = "modifiedResourceFactoryRegistry") ServiceReference<Resource.Factory.Registry> resourceFactoryRegistryReference ) {
The bind method that works looks as follows:
@Reference(policy=ReferencePolicy.STATIC, unbind="unsetResourceFactoryRegistry", updated = "modifiedResourceFactoryRegistry") public void setResourceFactoryRegistry(Resource.Factory.Registry resourceFactoryRegistry, Map<String, Object> properties) {
Both update methodes are mentioned correctly in the resulting component xml.
I also played around with ComponentServiceObjects, ServiceReference and the service itself. Result stays the same.
If the Spec says that this is the correct behavior that I can't fin the passage.