diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-12 12:35:33 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-12 12:35:33 +0200 |
commit | 48b3bf28c3007d549892eebd0fc6a18707c0d2c0 (patch) | |
tree | 3e21f0f6b1a1ccd104c343928acebad3c7cd4651 | |
parent | 8f9cbb8dbaaa364931a5c3cdc2fbc5ccc076c02b (diff) | |
download | sonarqube-48b3bf28c3007d549892eebd0fc6a18707c0d2c0.tar.gz sonarqube-48b3bf28c3007d549892eebd0fc6a18707c0d2c0.zip |
SONAR-4898 add debug logs
-rw-r--r-- | server/sonar-process/src/main/java/org/sonar/process/ProcessEntryPoint.java | 1 | ||||
-rw-r--r-- | server/sonar-search/src/main/java/org/sonar/search/SearchServer.java | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessEntryPoint.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessEntryPoint.java index 79ec79f74b7..6990545a571 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessEntryPoint.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessEntryPoint.java @@ -86,6 +86,7 @@ public class ProcessEntryPoint implements ProcessMXBean { @Override public boolean isReady() { + LoggerFactory.getLogger(getClass()).warn("Received JMX request isReady: " + (lifecycle.getState() == State.STARTED)); return lifecycle.getState() == State.STARTED; } diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java index 6e5a366ff64..cf7eb1682df 100644 --- a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java +++ b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java @@ -143,6 +143,16 @@ public class SearchServer implements MonitoredProcess { .setTemplate("*") .addMapping("_default_", "{\"dynamic\": \"strict\"}") .get(); + + boolean ready = false; + while (!ready) { + ready = isReady(); + try { + Thread.sleep(300L); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } } } |