summaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2020-08-21 11:48:53 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2020-08-21 11:48:58 +0100
commit26169c3db78c405f7b58e831c7391fc63ddb935d (patch)
treee43776dfa42ebeda8fcea4f6977c667966c05a7d /main/src
parentd4b134ae54a260f084be82ba1a6fcd4e6a3040e1 (diff)
Changes to make XACML container crash with non zero exitCode
Change-Id: Id8c18b6888128a3efaa96f05d911fde5e6a92694 Issue-ID: POLICY-2757 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/startstop/Main.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/startstop/Main.java b/main/src/main/java/org/onap/policy/pdpx/main/startstop/Main.java
index f57a0bd5..64c41330 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/startstop/Main.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/startstop/Main.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +24,9 @@ package org.onap.policy.pdpx.main.startstop;
import java.util.Arrays;
import lombok.Getter;
+import org.onap.policy.common.utils.resources.MessageConstants;
import org.onap.policy.pdpx.main.PolicyXacmlPdpException;
+import org.onap.policy.pdpx.main.PolicyXacmlPdpRuntimeException;
import org.onap.policy.pdpx.main.parameters.XacmlPdpParameterGroup;
import org.onap.policy.pdpx.main.parameters.XacmlPdpParameterHandler;
import org.slf4j.Logger;
@@ -78,7 +81,8 @@ public class Main {
// Add a shutdown hook to shut everything down in an orderly manner
Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown));
- LOGGER.info("Started policy xacml pdp service");
+ String successMsg = String.format(MessageConstants.START_SUCCESS_MSG, MessageConstants.POLICY_XACML_PDP);
+ LOGGER.info(successMsg);
}
/**
@@ -105,7 +109,8 @@ public class Main {
try {
new Main(args);
} catch (RuntimeException | PolicyXacmlPdpException e) {
- LOGGER.error("start of policy xacml pdp service failed", e);
+ throw new PolicyXacmlPdpRuntimeException(
+ String.format(MessageConstants.START_FAILURE_MSG, MessageConstants.POLICY_XACML_PDP), e);
}
}
}