You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Philippe (Jira)" <ji...@apache.org> on 2019/11/07 16:02:00 UTC
[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
Key: ARIES-1939
URL: https://issues.apache.org/jira/browse/ARIES-1939
Project: Aries
Issue Type: Bug
Components: Blueprint
Affects Versions: blueprint-core-1.10.2
Reporter: Philippe
Attachments: AbstractServiceReferenceRecipe.png
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.
!AbstractServiceReferenceRecipe.png!
*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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)