Modify uncaught exception handler to call System.exit(1). 10/4110/4
authorTomas Olvecky <tolvecky@cisco.com>
Thu, 9 Jan 2014 12:29:49 +0000 (13:29 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 13 Jan 2014 11:48:29 +0000 (11:48 +0000)
commit3a9876cd3ff25063d6820b687be358296fc59156
tree5204878469c4c22f4deca51fe17e951343905c9f
parent45b75a6ba76bf8b453b5f0de11ceb0c3bba1e842
Modify uncaught exception handler to call System.exit(1).

This introduces the ability to specify how uncaught exceptions are
handled via setting controller.uncaughtExceptionPolicy property.

There are two policies: IGNORE and ABORT. The former logs which thread
has died and does nothing else. The latter forces a virtual machine
shutdown when a thread dies.

The default policy is IGNORE, as that has been the historic setting. For
Helium release, this should probably get discussed, as uncontrolled
thread death may leave the controller in an inconsistent/invalid state.

Change-Id: Ib7c64b23e1cd3c7c45cfa31401410bba22acd431
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/distribution/opendaylight/src/main/resources/configuration/logback.xml
opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/Activator.java
opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/UncaughtExceptionHandler.java [deleted file]
opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/UncaughtExceptionPolicy.java [new file with mode: 0644]