Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6317

dynamic greedy optional/mandatory references can get wrong service ranking

    XMLWordPrintableJSON

Details

    Description

      @Reference(service = Service.class, cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)

      OR

      @Reference(service = Service.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)

      The above references may get injected with a service that is not the highest ranked service in scenarios that involve multiple threads registering the referenced service with different service rankings at the same time.

      If more than one thread is registering the service type with different rankings it is random which will be the final reference bound to the component. The expected result is that the highest ranked service is the final service bound to the component.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tjwatson Tom Watson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: