/*
* Install the default exception handler so that the uncaught
* exceptions are handled by our customized handler. This new
/*
* Install the default exception handler so that the uncaught
* exceptions are handled by our customized handler. This new
*/
Thread.setDefaultUncaughtExceptionHandler(new org.opendaylight.
controller.logging.bridge.internal.UncaughtExceptionHandler());
*/
Thread.setDefaultUncaughtExceptionHandler(new org.opendaylight.
controller.logging.bridge.internal.UncaughtExceptionHandler());
/*
* Install the Shutdown handler. This will intercept SIGTERM signal and
* close the system bundle. This allows for a graceful closing of OSGI
* framework.
*/
/*
* Install the Shutdown handler. This will intercept SIGTERM signal and
* close the system bundle. This allows for a graceful closing of OSGI
* framework.
*/
Runtime.getRuntime().addShutdownHook(new shutdownHandler(context));
} else {
this.log.error("Cannot register the LogListener because "
Runtime.getRuntime().addShutdownHook(new shutdownHandler(context));
} else {
this.log.error("Cannot register the LogListener because "
private class shutdownHandler extends Thread {
BundleContext bundlecontext;
public shutdownHandler(BundleContext ctxt) {
this.bundlecontext = ctxt;
}
private class shutdownHandler extends Thread {
BundleContext bundlecontext;
public shutdownHandler(BundleContext ctxt) {
this.bundlecontext = ctxt;
}