[jira] [Created] (ARIES-1939) ServiceReference never satisfied when service was registered during start of corresponding SatisfactionListener
Philippe created ARIES-1939:
Summary: ServiceReference never satisfied when service was registered during start of corresponding SatisfactionListener
URL: https://issues.apache.org/jira/browse/ARIES-1939 Project: Aries
Issue Type: Bug
Affects Versions: blueprint-core-1.10.2
The start of the OSGi container fails if a service is registered at the same time as a SatisfactionListener (that listens for the same service) is started. This leads to a wrong value of 'satisfied'.
In detail, it means that method org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.start() (for starting the satisfaction listener for service C) is executed by BlueprintExtender thread A and method org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.serviceAdded() (triggered by registering service C) is executed by BlueprintExtender thread B exactly at the same time.
The same problem can probably also happen when method org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.serviceRemoved() is executed at the same time as method org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.start().
- synchronize computation and modification of satisfied variable in all places.
This message was sent by Atlassian Jira