diff options
Diffstat (limited to 'jdisc_core')
-rw-r--r-- | jdisc_core/src/main/java/com/yahoo/jdisc/core/BootstrapDaemon.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/core/BootstrapDaemon.java b/jdisc_core/src/main/java/com/yahoo/jdisc/core/BootstrapDaemon.java index cc87abdd292..03110782d23 100644 --- a/jdisc_core/src/main/java/com/yahoo/jdisc/core/BootstrapDaemon.java +++ b/jdisc_core/src/main/java/com/yahoo/jdisc/core/BootstrapDaemon.java @@ -5,6 +5,7 @@ import org.apache.commons.daemon.Daemon; import org.apache.commons.daemon.DaemonContext; import java.util.Arrays; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -51,11 +52,20 @@ public class BootstrapDaemon implements Daemon { @Override public void start() throws Exception { - if (!privileged) { - log.finer("Initializing application without privileges."); - loader.init(bundleLocation, false); + try { + if (!privileged) { + log.finer("Initializing application without privileges."); + loader.init(bundleLocation, false); + } + loader.start(); + } catch (Exception e) { + try { + log.log(Level.SEVERE, "Failed starting container", e); + } + finally { + Runtime.getRuntime().halt(1); + } } - loader.start(); } @Override |