Change-Id: I12231dfef13215b8eb7ddec2224780dc62c46c54
Issue-ID: HOLMES-47
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
// 2. start mq listener
registerAlarmTopicListener();
} catch (Exception e) {
// 2. start mq listener
registerAlarmTopicListener();
} catch (Exception e) {
- log.error("Start service failed: " + e.getMessage());
+ log.error("Start service failed: " + e.getMessage(), e);
throw ExceptionUtil.buildExceptionResponse("Start service failed!");
}
}
throw ExceptionUtil.buildExceptionResponse("Start service failed!");
}
}
private void start() throws EngineException, RuleIllegalityException, DbException {
private void start() throws EngineException, RuleIllegalityException, DbException {
- log.info("Drools Egine Initialize Begining ... ");
+ log.info("Drools Engine Initialize Beginning...");
initEngineParameter();
initDeployRule();
initEngineParameter();
initDeployRule();
- log.info("Business Rule Egine Initialize Successfully ");
+ log.info("Business Rule Engine Initialize Successfully.");
- public void stop() throws Exception {
this.ksession.dispose();
}
this.ksession.dispose();
}
private void initDeployRule() throws RuleIllegalityException, EngineException, DbException {
List<CorrelationRule> rules = ruleMgtWrapper.queryRuleByEnable(ENABLE);
private void initDeployRule() throws RuleIllegalityException, EngineException, DbException {
List<CorrelationRule> rules = ruleMgtWrapper.queryRuleByEnable(ENABLE);
- if (rules.size() > 0) {
+ if (!rules.isEmpty()) {
for (CorrelationRule rule : rules) {
if (rule.getContent() != null) {
deployRuleFromCache(rule.getContent());
for (CorrelationRule rule : rules) {
if (rule.getContent() != null) {
deployRuleFromCache(rule.getContent());
}
}
} catch (JMSException e) {
}
}
} catch (JMSException e) {
- log.error("connection mq service Failed: " + e.getMessage());
+ log.error("connection mq service Failed: " + e.getMessage(), e);