aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/main/java')
-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);
}
}