@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { processState.setStopping(); final Thread thread = new Thread(new Runnable() { public void run() { System.exit(restart ? ExitCodes.RESTART_PROCESS_FROM_STARTUP_SCRIPT : ExitCodes.NORMAL); } }); // The intention is that this shutdown is graceful, and so the client gets a reply. // At the time of writing we did not yet have graceful shutdown. thread.setName("Management Triggered Shutdown"); thread.start(); context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, OperationContext.Stage.RUNTIME);
void shutdown() { if(compareAndSet(false, true)) { processState.setStopping(); final Thread thread = new Thread(new Runnable() { public void run() { int exitCode = restart ? ExitCodes.RESTART_PROCESS_FROM_STARTUP_SCRIPT : ExitCodes.NORMAL; SystemExiter.logAndExit(new SystemExiter.ExitLogger() { @Override public void logExit() { ServerLogger.ROOT_LOGGER.shuttingDownInResponseToManagementRequest(op); } }, exitCode); } }); // The intention is that this shutdown is graceful, and so the client gets a reply. // At the time of writing we did not yet have graceful shutdown. thread.setName("Management Triggered Shutdown"); thread.start(); } } }
void shutdown() { if(compareAndSet(false, true)) { processState.setStopping(); final Thread thread = new Thread(new Runnable() { public void run() { int exitCode = restart ? ExitCodes.RESTART_PROCESS_FROM_STARTUP_SCRIPT : ExitCodes.NORMAL; SystemExiter.logAndExit(new SystemExiter.ExitLogger() { @Override public void logExit() { ServerLogger.ROOT_LOGGER.shuttingDownInResponseToManagementRequest(op); } }, exitCode); } }); // The intention is that this shutdown is graceful, and so the client gets a reply. // At the time of writing we did not yet have graceful shutdown. thread.setName("Management Triggered Shutdown"); thread.start(); } } }
@Override public void stop(StopContext context) { String prettyVersion = environment.getProductConfig().getPrettyVersionString(); processState.setStopping(); AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); }
@Override public void stopLocalHost(int exitCode) { final ProcessControllerClient client = injectedProcessControllerConnection.getValue().getClient(); processState.setStopping(); try { client.shutdown(exitCode); } catch (IOException e) { throw HostControllerLogger.ROOT_LOGGER.errorClosingDownHost(e); } }
@Override public synchronized void stop(final StopContext context) { processState.setStopping(); CurrentServiceContainer.setServiceContainer(null); String prettyVersion = configuration.getServerEnvironment().getProductConfig().getPrettyVersionString(); AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); }
@Override public void stopLocalHost(int exitCode) { final ProcessControllerClient client = injectedProcessControllerConnection.getValue().getClient(); processState.setStopping(); try { client.shutdown(exitCode); } catch (IOException e) { throw MESSAGES.errorClosingDownHost(e); } }
controller = null; stabilityMonitor = null; processState.setStopping(); Runnable r = new Runnable() { @Override
@Override public synchronized void stop(final StopContext context) { processState.setStopping(); CurrentServiceContainer.setServiceContainer(null); String prettyVersion = configuration.getServerEnvironment().getProductConfig().getPrettyVersionString(); AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); }
@Override public void stopLocalHost(int exitCode) { final ProcessControllerClient client = injectedProcessControllerConnection.getValue().getClient(); processState.setStopping(); try { client.shutdown(exitCode); } catch (IOException e) { throw HostControllerLogger.ROOT_LOGGER.errorClosingDownHost(e); } }
controller = null; stabilityMonitor = null; processState.setStopping(); Runnable r = new Runnable() { @Override
suspend(sc); ps.setStopping();
suspend(sc); ps.setStopping();