Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
blueprint-core-1.10.2
-
None
-
None
Description
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.
Remarks:
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().
Suggested Solution:
- synchronize computation and modification of satisfied variable in all places.