@Override
    public void stop() throws BundleException {
        log.fine("Stopping felix.");
        BundleContext ctx = felix.getBundleContext();
        if (ctx != null) {
            if (logListener != null) {
                logListener.uninstall();
            }
            logService.stop();
            collisionHook.stop();
        }
        felix.stop();
        try {
            felix.waitForStop(0);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }
@author Simon Thoresen Hult
@author gjoranv
jdisc_core/src/main/java/com/yahoo/jdisc/core/FelixFramework.java