public void shutdown() throws Fabric3Exception { if (state == RuntimeState.RUNNING) { EventService eventService = runtime.getComponent(EventService.class); eventService.publish(new TransportStop()); eventService.publish(new RuntimeStop()); RuntimeDestroyed destroyed = new RuntimeDestroyed(); // instantiate event before classloaders are disabled with the call to destroy() runtime.destroy(); eventService.publish(destroyed); } state = RuntimeState.SHUTDOWN; }
public void shutdown() throws Fabric3Exception { if (state == RuntimeState.RUNNING) { EventService eventService = runtime.getComponent(EventService.class); eventService.publish(new TransportStop()); eventService.publish(new RuntimeStop()); RuntimeDestroyed destroyed = new RuntimeDestroyed(); // instantiate event before classloaders are disabled with the call to destroy() runtime.destroy(); eventService.publish(destroyed); } state = RuntimeState.SHUTDOWN; }