Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
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
- links to