Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1939

ServiceReference never satisfied when service was registered during start of corresponding SatisfactionListener

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • blueprint-core-1.10.2
    • None
    • Blueprint
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Büttner Philippe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: