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)

Reply via email to