From 2b5e9191374d82eeed8f07fa4940aeee75ff4bdb Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Thu, 19 Feb 2015 18:58:59 +0100 Subject: SONAR-6036 use IPC (Inter Process Communication) for monitoring processes --- sonar-application/src/main/assembly/conf/wrapper.conf | 1 + sonar-application/src/main/java/org/sonar/application/App.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sonar-application') diff --git a/sonar-application/src/main/assembly/conf/wrapper.conf b/sonar-application/src/main/assembly/conf/wrapper.conf index 86834b8a80b..530e560b787 100644 --- a/sonar-application/src/main/assembly/conf/wrapper.conf +++ b/sonar-application/src/main/assembly/conf/wrapper.conf @@ -86,3 +86,4 @@ wrapper.ntservice.interactive=false wrapper.disable_restarts=TRUE wrapper.ping.timeout=0 wrapper.shutdown.timeout=3000 +wrapper.jvm_exit.timeout=3000 diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java index e70c34df4fe..f5418d42ab8 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -28,6 +28,7 @@ import org.sonar.process.Props; import org.sonar.process.StopWatcher; import org.sonar.process.Stoppable; import org.sonar.process.monitor.JavaCommand; +import org.sonar.process.monitor.KnownJavaCommand; import org.sonar.process.monitor.Monitor; import java.io.File; @@ -53,9 +54,8 @@ public class App implements Stoppable { public void start(Props props) { if (props.valueAsBoolean(ProcessConstants.ENABLE_STOP_COMMAND, false)) { - // stop application when file /app.stop is created File tempDir = props.nonNullValueAsFile(ProcessConstants.PATH_TEMP); - ProcessCommands commands = new ProcessCommands(tempDir, "app"); + ProcessCommands commands = new ProcessCommands(tempDir, KnownJavaCommand.APP.getIndex()); stopWatcher = new StopWatcher(commands, this); stopWatcher.start(); } -- cgit v1.2.3