code: private static final void stopBroker() {
  		AbstractApplicationContext instance = context.getAndSet(null);
  		if (instance != null) {
  			Thread safetyTimer = new Thread() {
  
  				public void run() {
  					try {
  						Thread.sleep(15000);
  						Runtime.getRuntime().halt(1);
  					} catch (Throwable ignored) {
  					}
  				}
  
  			};
  			safetyTimer.setDaemon(true);
  			safetyTimer.start();
  			try {
  				instance.stop();
  			} catch (Throwable ignored) {
  			}
  			try {
  				Thread.sleep(600);
  			} catch (Throwable interrupted) {
  			}
  			Runtime.getRuntime().halt(0);
  		}
  	}
docs: --- STOP SERVICE BROKER ---