Fix OSGiRSVPExtensionConsumerContext whiteboard 42/93742/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Nov 2020 17:41:21 +0000 (18:41 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Nov 2020 17:41:50 +0000 (18:41 +0100)
We need to have a greedy policy here, otherwise we might miss some
extensions.

JIRA: BGPCEP-923
Change-Id: I5111e4710d196bc26cce03eac8ebc5238de68c22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
rsvp/spi/src/main/java/org/opendaylight/protocol/rsvp/parser/spi/pojo/OSGiRSVPExtensionConsumerContext.java

index 519ffab8d9a4a8c8581514ed00554d84a6cadc0f..eb0b881302fac4657e2feeafdcb4e3de98563b03 100644 (file)
@@ -16,11 +16,12 @@ import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
 import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferencePolicyOption;
 
 @Component(immediate = true, service = RSVPExtensionConsumerContext.class)
 // FIXME: merge with DefaultRSVPExtensionConsumerContext once we have OSGi R7
 public final class OSGiRSVPExtensionConsumerContext extends ForwardingRSVPExtensionConsumerContext {
-    @Reference
+    @Reference(policyOption = ReferencePolicyOption.GREEDY)
     List<RSVPExtensionProviderActivator> extensionActivators;
 
     private SimpleRSVPExtensionProviderContext delegate;