aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-02-24 16:46:37 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-02-26 07:38:05 +0100
commit76a4e8fb654e850944ff179ba945989fe7afecec (patch)
tree37107caf2462577eeba0b657728b18535f127e51 /sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java
parent03acebc23f8902d64efd7689cadb2711f9ac67b3 (diff)
downloadsonarqube-76a4e8fb654e850944ff179ba945989fe7afecec.tar.gz
sonarqube-76a4e8fb654e850944ff179ba945989fe7afecec.zip
Drop usages of MyBatis#openSession()
in favor of DbClient#openSession()
Diffstat (limited to 'sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java70
1 files changed, 35 insertions, 35 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java b/sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java
index 4f9ebd80ed8..8058beb1018 100644
--- a/sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java
+++ b/sonar-application/src/main/java/org/sonar/application/JavaCommandFactoryImpl.java
@@ -46,49 +46,49 @@ public class JavaCommandFactoryImpl implements JavaCommandFactory {
@Override
public JavaCommand createESCommand(Props props, File workDir) {
- return newJavaCommand(ProcessId.ELASTICSEARCH, props, workDir)
- .addJavaOptions("-Djava.awt.headless=true")
- .addJavaOptions(props.nonNullValue(ProcessProperties.SEARCH_JAVA_OPTS))
- .addJavaOptions(props.nonNullValue(ProcessProperties.SEARCH_JAVA_ADDITIONAL_OPTS))
- .setClassName("org.sonar.search.SearchServer")
- .addClasspath("./lib/common/*")
- .addClasspath("./lib/search/*");
- }
+ return newJavaCommand(ProcessId.ELASTICSEARCH, props, workDir)
+ .addJavaOptions("-Djava.awt.headless=true")
+ .addJavaOptions(props.nonNullValue(ProcessProperties.SEARCH_JAVA_OPTS))
+ .addJavaOptions(props.nonNullValue(ProcessProperties.SEARCH_JAVA_ADDITIONAL_OPTS))
+ .setClassName("org.sonar.search.SearchServer")
+ .addClasspath("./lib/common/*")
+ .addClasspath("./lib/search/*");
+ }
@Override
public JavaCommand createWebCommand(Props props, File workDir) {
- JavaCommand command = newJavaCommand(ProcessId.WEB_SERVER, props, workDir)
- .addJavaOptions(ProcessProperties.WEB_ENFORCED_JVM_ARGS)
- .addJavaOptions(props.nonNullValue(ProcessProperties.WEB_JAVA_OPTS))
- .addJavaOptions(props.nonNullValue(ProcessProperties.WEB_JAVA_ADDITIONAL_OPTS))
- // required for logback tomcat valve
- .setEnvVariable(ProcessProperties.PATH_LOGS, props.nonNullValue(ProcessProperties.PATH_LOGS))
- .setClassName("org.sonar.server.app.WebServer")
- .addClasspath("./lib/common/*")
- .addClasspath("./lib/server/*");
- String driverPath = props.value(ProcessProperties.JDBC_DRIVER_PATH);
- if (driverPath != null) {
- command.addClasspath(driverPath);
- }
- return command;
+ JavaCommand command = newJavaCommand(ProcessId.WEB_SERVER, props, workDir)
+ .addJavaOptions(ProcessProperties.WEB_ENFORCED_JVM_ARGS)
+ .addJavaOptions(props.nonNullValue(ProcessProperties.WEB_JAVA_OPTS))
+ .addJavaOptions(props.nonNullValue(ProcessProperties.WEB_JAVA_ADDITIONAL_OPTS))
+ // required for logback tomcat valve
+ .setEnvVariable(ProcessProperties.PATH_LOGS, props.nonNullValue(ProcessProperties.PATH_LOGS))
+ .setClassName("org.sonar.server.app.WebServer")
+ .addClasspath("./lib/common/*")
+ .addClasspath("./lib/server/*");
+ String driverPath = props.value(ProcessProperties.JDBC_DRIVER_PATH);
+ if (driverPath != null) {
+ command.addClasspath(driverPath);
}
+ return command;
+ }
@Override
public JavaCommand createCeCommand(Props props, File workDir) {
- JavaCommand command = newJavaCommand(ProcessId.COMPUTE_ENGINE, props, workDir)
- .addJavaOptions(ProcessProperties.CE_ENFORCED_JVM_ARGS)
- .addJavaOptions(props.nonNullValue(ProcessProperties.CE_JAVA_OPTS))
- .addJavaOptions(props.nonNullValue(ProcessProperties.CE_JAVA_ADDITIONAL_OPTS))
- .setClassName("org.sonar.ce.app.CeServer")
- .addClasspath("./lib/common/*")
- .addClasspath("./lib/server/*")
- .addClasspath("./lib/ce/*");
- String driverPath = props.value(ProcessProperties.JDBC_DRIVER_PATH);
- if (driverPath != null) {
- command.addClasspath(driverPath);
- }
- return command;
+ JavaCommand command = newJavaCommand(ProcessId.COMPUTE_ENGINE, props, workDir)
+ .addJavaOptions(ProcessProperties.CE_ENFORCED_JVM_ARGS)
+ .addJavaOptions(props.nonNullValue(ProcessProperties.CE_JAVA_OPTS))
+ .addJavaOptions(props.nonNullValue(ProcessProperties.CE_JAVA_ADDITIONAL_OPTS))
+ .setClassName("org.sonar.ce.app.CeServer")
+ .addClasspath("./lib/common/*")
+ .addClasspath("./lib/server/*")
+ .addClasspath("./lib/ce/*");
+ String driverPath = props.value(ProcessProperties.JDBC_DRIVER_PATH);
+ if (driverPath != null) {
+ command.addClasspath(driverPath);
}
+ return command;
+ }
private static JavaCommand newJavaCommand(ProcessId id, Props props, File workDir) {
JavaCommand command = new JavaCommand(id)