@Override
    public void destroy() {
        log.finer("Destroying application loader.");
        try {
            watchdog.close();
            osgiFramework.stop();
            LogSetup.cleanup();
        } catch (BundleException | InterruptedException e) {
            e.printStackTrace();
        }
    }
@author Simon Thoresen Hult
@author bjorncs
jdisc_core/src/main/java/com/yahoo/jdisc/core/ApplicationLoader.java