Fix OSGiBGPTableTypeRegistryConsumer whiteboard 43/93743/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Nov 2020 17:43:25 +0000 (18:43 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Nov 2020 17:44:04 +0000 (18:44 +0100)
We need to have a greedy policy here, otherwise we might miss some
extensions.

JIRA: BGPCEP-942
Change-Id: I33589f167be78d10139979dc62ab2a17e74e455a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/openconfig-spi/src/main/java/org/opendaylight/protocol/bgp/openconfig/spi/OSGiBGPTableTypeRegistryConsumer.java

index a6a731c68d61ad996b4c22a91d7dc545f3590d8f..9bdda6402395981bbadcda68ef12db9746e51ae5 100644 (file)
@@ -18,6 +18,7 @@ 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;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -26,7 +27,7 @@ import org.slf4j.LoggerFactory;
 public final class OSGiBGPTableTypeRegistryConsumer implements BGPTableTypeRegistryConsumer {
     private static final Logger LOG = LoggerFactory.getLogger(OSGiBGPTableTypeRegistryConsumer.class);
 
-    @Reference
+    @Reference(policyOption = ReferencePolicyOption.GREEDY)
     List<BGPTableTypeRegistryProviderActivator> extensionActivators;
 
     private DefaultBGPTableTypeRegistryConsumer delegate;