summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/main/java/org
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-02-09 18:21:49 +0000
committerAjith Sreekumar <ajith.sreekumar@bell.ca>2021-02-11 10:01:27 +0000
commitf86d08ca5598571410386372f3f06d5c8c686c74 (patch)
tree644913448310e4ea5fe201c16554a2f739d49a43 /services/services-engine/src/main/java/org
parentc64320a45b77eb3474f1f3f7372f1cd1f85ddfef (diff)
Changes related to multi policy handling improvement in APEX
This review fixes an issue identified during testing the changes done for improving multiple policy handling in APEX. Changes done to a few test files in the previous review are reverted as well. Change-Id: I98324da708239d314aadd4c45dc377137fd552ba Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'services/services-engine/src/main/java/org')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
index 65c2acffa..3e9072dd4 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
@@ -71,7 +71,7 @@ public class ApexMain {
* @param args the command line arguments
* @throws ApexException the apex exception.
*/
- public ApexMain(final String[] args) throws ApexException {
+ public ApexMain(final String[] args) {
LOGGER.entry("Starting Apex service with parameters " + Arrays.toString(args) + " . . .");
try {
apexParameters = populateApexParameters(args);
@@ -79,17 +79,18 @@ public class ApexMain {
LOGGER.error(APEX_SERVICE_FAILED_MSG, e);
return;
}
- aggregateParametersAndRegister();
+ try {
+ aggregateParametersAndRegister();
- // Now, create the activator for the Apex service
- activator = new ApexActivator(apexParameters);
+ // Now, create the activator for the Apex service
+ activator = new ApexActivator(apexParameters);
- // Start the activator
- try {
+ // Start the activator
activator.initialize();
setAlive(true);
- } catch (final ApexActivatorException e) {
- throw new ApexException("start of Apex service failed, used parameters are " + Arrays.toString(args), e);
+ } catch (final ApexException e) {
+ LOGGER.error("start of Apex service failed, used parameters are {}", Arrays.toString(args), e);
+ return;
}
// Add a shutdown hook to shut everything down in an orderly manner
@@ -246,7 +247,7 @@ public class ApexMain {
* @param args the arguments
* @throws ApexException the apex exception.
*/
- public static void main(final String[] args) throws ApexException {
+ public static void main(final String[] args) {
new ApexMain(args);
}
}