log.info("Setting up ProcessDestroyer with waitOnShutdown=" + waitOnShutdown); pd.setWaitOnShutdown(waitOnShutdown); executor.setProcessDestroyer(pd); executor.execute(cl, h);
log.info("Setting up ProcessDestroyer with waitOnShutdown=" + waitOnShutdown); pd.setWaitOnShutdown(waitOnShutdown); executor.setProcessDestroyer(pd); executor.execute(cl, h);
/** * Run Jetty in separate fork at http://localhost:{@link #port}/{@link #contextPath}. Use {@link #webAppDirectory} * as web application context war. * * @throws Exception if can't start Jetty server. */ protected void runForked() throws Exception { //NOSONAR String commandLine = createCommandLine(); logger.info(String.format("Executing 'java %s'", commandLine)); CommandLine cmdLine = CommandLine.parse(commandLine); Executor executor = CamelotRunnerUtils.createExecutor(); DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler(); executor.setStreamHandler(createStreamHandler()); if (waitFor) { // shutdown process if we were killed while waiting for it executor.setProcessDestroyer(new ShutdownHookProcessDestroyer()); } executor.execute(cmdLine, resultHandler); if (waitFor) { logger.info("Waiting until process is finished..."); resultHandler.waitFor(); } else { logger.info("Waiting until camelot is deployed..."); while (!release) { sleep(2000); } logger.info(String.format(" ==== Camelot is STARTED at http://localhost:%s%s ==== ", port, contextPath)); } }
log.info("Executing " + cl); e.setStreamHandler(new PumpStreamHandler()); e.setProcessDestroyer(new ShutdownHookProcessDestroyer()); e.execute(cl, h);
log.info("Executing " + cl); e.setStreamHandler(new PumpStreamHandler()); e.setProcessDestroyer(new ShutdownHookProcessDestroyer()); e.execute(cl, h);
executor.setProcessDestroyer(new ShutdownHookProcessDestroyer()); ExecuteWatchdog watchDog = new ExecuteWatchdog(watchdogTimeout); executor.setWatchdog(watchDog);
exec.setWorkingDirectory(getWorkingDirectory()); ShutdownHookProcessDestroyer destroyer = new ShutdownHookProcessDestroyer(); exec.setProcessDestroyer(destroyer);
exec.setProcessDestroyer( getProcessDestroyer() );
exec.setProcessDestroyer( getProcessDestroyer() );
executor.setProcessDestroyer(new ShutdownHookProcessDestroyer()); executor.setWatchdog(new ExecuteWatchdog(ExecuteWatchdog.INFINITE_TIMEOUT));