/** * Primary entry point for startup and shutdown events. * * @param event The event that has occurred */ public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.START_EVENT.equals(event.getType())) { component = event.getLifecycle(); createMBeans(); } else if (Lifecycle.STOP_EVENT.equals(event.getType())) { destroyMBeans(); component = null; } }
@Override public void lifecycleEvent(LifecycleEvent event) { Lifecycle lifecycle = event.getLifecycle(); System.out.println("SimpleContextLifecycleListener's event " + event.getType().toString()); if (Lifecycle.START_EVENT.equals(event.getType())) { System.out.println("Starting context."); } else if (Lifecycle.STOP_EVENT.equals(event.getType())) { System.out.println("Stopping context."); } }
public void lifecycleEvent(LifecycleEvent event) { if (event.getLifecycle() != standardServer) { return; } if (Lifecycle.START_EVENT.equals(event.getType())) { start(); } else if (Lifecycle.STOP_EVENT.equals(event.getType())) { stop(); } }