summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-10-30 22:27:42 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-10-30 22:27:42 +0800
commitcab74c538b053cca4279aed6f7a8c32d7497f6bd (patch)
treef4da24c51c61e75b1bc066636e075a91b5fc8346 /rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java
parent6388611221f67862468bc0acb1e675d3e03b5e00 (diff)
Change the logic of Service Registration
Change-Id: I9714c94dad458f7cf0d00126934ae76dd2896716 Issue-ID: HOLMES-81 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java')
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java
index 2b8f986..01fde48 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java
@@ -48,16 +48,16 @@ public class RuleActiveApp extends IOCApplication<RuleAppConfig> {
public void run(RuleAppConfig configuration, Environment environment) throws Exception {
super.run(configuration, environment);
- ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
- service.scheduleAtFixedRate(new DcaeConfigurationPolling("holmes-rule-mgmt"), 0,
- DcaeConfigurationPolling.POLLING_PERIOD, TimeUnit.MILLISECONDS);
-
environment.jersey().register(new RuleMgtResources());
try {
new MSBRegisterUtil().register2Msb(createMicroServiceInfo());
} catch (CorrelationException e) {
log.warn(e.getMessage(), e);
}
+
+ ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
+ service.scheduleAtFixedRate(new DcaeConfigurationPolling("holmes-rule-mgmt"), 0,
+ DcaeConfigurationPolling.POLLING_PERIOD, TimeUnit.MILLISECONDS);
}
private MicroServiceInfo createMicroServiceInfo() {