diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-05 11:35:34 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-05 13:00:09 +0200 |
commit | bf3948b6f977bcfa79cb3257f756031385570d3a (patch) | |
tree | 54848253cd68cf2e276d4cbb91328cfa409993b2 /sonar-application/src | |
parent | 72d9878488a66ec791c701ef87475db4befacbb1 (diff) | |
download | sonarqube-bf3948b6f977bcfa79cb3257f756031385570d3a.tar.gz sonarqube-bf3948b6f977bcfa79cb3257f756031385570d3a.zip |
SONAR-5483 - Do not launch web server when "sonar.cluster.master" property is set
Diffstat (limited to 'sonar-application/src')
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/App.java | 5 | ||||
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/DefaultSettings.java | 2 |
2 files changed, 3 insertions, 4 deletions
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 c0ac5035a5a..66e3b7a1e26 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -30,8 +30,6 @@ import org.sonar.process.ProcessWrapper; public class App implements ProcessMXBean { - private static final String SONAR_CLUSTER_MASTER = "sonar.cluster.master"; - private final Installation installation; private Monitor monitor = new Monitor(); @@ -46,7 +44,6 @@ public class App implements ProcessMXBean { } public void start() throws InterruptedException { - System.out.println("installation = " + installation.prop(SONAR_CLUSTER_MASTER, null)); try { Logger logger = LoggerFactory.getLogger(getClass()); monitor.start(); @@ -67,7 +64,7 @@ public class App implements ProcessMXBean { logger.info("search server is up"); //do not yet start SQ in cluster mode. See SONAR-5483 & SONAR-5391 - if (StringUtils.isEmpty(installation.prop(SONAR_CLUSTER_MASTER, null))) { + if (StringUtils.isEmpty(installation.prop(DefaultSettings.SONAR_CLUSTER_MASTER, null))) { server = new ProcessWrapper(JmxUtils.WEB_SERVER_NAME) .setWorkDir(installation.homeDir()) .setJmxPort(Integer.parseInt(installation.prop(DefaultSettings.WEB_JMX_PORT_KEY))) diff --git a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java index d90c8a1bbb0..154919113e2 100644 --- a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java +++ b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java @@ -28,6 +28,8 @@ class DefaultSettings { // only static stuff } + static final String SONAR_CLUSTER_MASTER = "sonar.cluster.master"; + static final String PATH_LOGS_KEY = "sonar.path.logs"; static final String ES_PORT_KEY = "sonar.search.port"; |