diff options
Diffstat (limited to 'services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java')
-rw-r--r-- | services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java b/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java index f576bdfd4..7f11de713 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java @@ -27,6 +27,7 @@ import java.util.Properties; import org.onap.policy.apex.starter.exception.ApexStarterException; import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup; import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler; +import org.onap.policy.common.utils.services.Registry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -88,12 +89,13 @@ public class ApexStarterMain { // create the activator activator = new ApexStarterActivator(parameterGroup, topicProperties); - + Registry.register(ApexStarterConstants.REG_APEX_STARTER_ACTIVATOR, activator); // Start the activator try { activator.initialize(); } catch (final ApexStarterException e) { LOGGER.error("start of ApexStarter failed, used parameters are {}", Arrays.toString(args), e); + Registry.unregister(ApexStarterConstants.REG_APEX_STARTER_ACTIVATOR); return; } |