catch and log cluster singleton service registration exceptions
[groupbasedpolicy.git] / sxp-integration / ip-sgt-distribution-service / src / main / java / org / opendaylight / controller / config / yang / config / ip / sgt / distribution / service / cfg / IpSgtDistributionServiceInstance.java
index e1f9638661288e1ba20099ba2df656df61dbfdba..d695aae42bc725d65e1a264fc20daef6da4c3d96 100644 (file)
@@ -57,7 +57,11 @@ public class IpSgtDistributionServiceInstance
 
     public void initialize() {
         LOG.info("Clustering session initiated for {}", this.getClass().getSimpleName());
-        singletonServiceRegistration = clusterSingletonService.registerClusterSingletonService(this);
+        try {
+            singletonServiceRegistration = clusterSingletonService.registerClusterSingletonService(this);
+        } catch (Exception e) {
+            LOG.warn("Exception thrown while registering cluster singleton service in {}", this.getClass(), e.getMessage());
+        }
     }
 
     @Override