aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main/java/org/sonar
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-09-21 21:22:59 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-09-21 21:27:19 +0200
commitbbca1b8de515423e6fd0d7e93e0d2f49e82dd7ba (patch)
treee07194d1fa98865db4ffff2cc86e5a552ad74f53 /sonar-application/src/main/java/org/sonar
parent9999a96f4b0cbb345cd4690ebc37452ff624e1d5 (diff)
downloadsonarqube-bbca1b8de515423e6fd0d7e93e0d2f49e82dd7ba.tar.gz
sonarqube-bbca1b8de515423e6fd0d7e93e0d2f49e82dd7ba.zip
SONAR-4898 drop RMI and autokill
Diffstat (limited to 'sonar-application/src/main/java/org/sonar')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java27
-rw-r--r--sonar-application/src/main/java/org/sonar/application/DefaultSettings.java4
2 files changed, 3 insertions, 28 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 600828ec1db..db1f9fcb5f6 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -21,12 +21,9 @@ package org.sonar.application;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
-import org.sonar.process.JmxUtils;
import org.sonar.process.MinimumViableSystem;
import org.sonar.process.ProcessLogging;
-import org.sonar.process.ProcessMXBean;
import org.sonar.process.Props;
-import org.sonar.process.State;
import org.sonar.process.monitor.JavaCommand;
import org.sonar.process.monitor.Monitor;
@@ -38,7 +35,7 @@ import java.util.Properties;
/**
* Entry-point of process that starts and monitors elasticsearch and web servers
*/
-public class App implements ProcessMXBean {
+public class App {
private final Monitor monitor;
@@ -48,7 +45,6 @@ public class App implements ProcessMXBean {
App(Monitor monitor) {
this.monitor = monitor;
- JmxUtils.registerMBean(this, "SonarQube");
}
public void start(Props props) {
@@ -60,10 +56,9 @@ public class App implements ProcessMXBean {
List<JavaCommand> commands = new ArrayList<JavaCommand>();
File homeDir = props.nonNullValueAsFile("sonar.path.home");
File tempDir = props.nonNullValueAsFile("sonar.path.temp");
- JavaCommand elasticsearch = new JavaCommand(JmxUtils.SEARCH_SERVER_NAME);
+ JavaCommand elasticsearch = new JavaCommand("search");
elasticsearch
.setWorkDir(homeDir)
- .setJmxPort(props.valueAsInt(DefaultSettings.SEARCH_JMX_PORT))
.addJavaOptions(props.value(DefaultSettings.SEARCH_JAVA_OPTS))
.setTempDir(tempDir.getAbsoluteFile())
.setClassName("org.sonar.search.SearchServer")
@@ -74,9 +69,8 @@ public class App implements ProcessMXBean {
// do not yet start SQ in cluster mode. See SONAR-5483 & SONAR-5391
if (StringUtils.isEmpty(props.value(DefaultSettings.CLUSTER_MASTER))) {
- JavaCommand webServer = new JavaCommand(JmxUtils.WEB_SERVER_NAME)
+ JavaCommand webServer = new JavaCommand("web")
.setWorkDir(homeDir)
- .setJmxPort(props.valueAsInt(DefaultSettings.WEB_JMX_PORT))
.addJavaOptions(props.nonNullValue(DefaultSettings.WEB_JAVA_OPTS))
.setTempDir(tempDir.getAbsoluteFile())
// required for logback tomcat valve
@@ -94,21 +88,6 @@ public class App implements ProcessMXBean {
return commands;
}
- @Override
- public void terminate() {
- monitor.stop();
- }
-
- @Override
- public boolean isReady() {
- return monitor.getState() == State.STARTED;
- }
-
- @Override
- public void ping() {
-
- }
-
static String starPath(File homeDir, String relativePath) {
File dir = new File(homeDir, relativePath);
return FilenameUtils.concat(dir.getAbsolutePath(), "*");
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 b18d0b633b2..701249f5f63 100644
--- a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
+++ b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
@@ -35,9 +35,7 @@ class DefaultSettings {
static final String CLUSTER_NAME = "sonar.cluster.name";
static final String CLUSTER_NODE_NAME = "sonar.node.name";
static final String SEARCH_PORT = "sonar.search.port";
- static final String SEARCH_JMX_PORT = "sonar.search.jmxPort";
static final String SEARCH_JAVA_OPTS = "sonar.search.javaOpts";
- static final String WEB_JMX_PORT = "sonar.web.jmxPort";
static final String WEB_JAVA_OPTS = "sonar.web.javaOpts";
static final String JDBC_URL = "sonar.jdbc.url";
static final String JDBC_LOGIN = "sonar.jdbc.username";
@@ -84,8 +82,6 @@ class DefaultSettings {
private static Map<String, Integer> defaultPorts() {
Map<String, Integer> defaults = new HashMap<String, Integer>();
defaults.put(SEARCH_PORT, 9001);
- defaults.put(SEARCH_JMX_PORT, 9002);
- defaults.put(WEB_JMX_PORT, 9003);
return defaults;
}
}