aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce/src
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-06-08 17:51:17 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-07-11 10:15:10 +0200
commit81a6eef465d500e89d7bbf3a818fed1910951c84 (patch)
tree35f93b4f050e55345e1e62a8027f57eeae21a2c8 /server/sonar-ce/src
parentb631f20affe9c7d1bb4bf2e66c1b47d68a8438b5 (diff)
downloadsonarqube-81a6eef465d500e89d7bbf3a818fed1910951c84.tar.gz
sonarqube-81a6eef465d500e89d7bbf3a818fed1910951c84.zip
SONAR-8785 cache DbSession in ThreadLocals for HTTP requests
Diffstat (limited to 'server/sonar-ce/src')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java2
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
index 5f50464eb51..59e18e5f049 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
@@ -22,6 +22,7 @@ package org.sonar.ce.container;
import com.google.common.annotations.VisibleForTesting;
import java.util.List;
import javax.annotation.CheckForNull;
+import org.sonar.db.DBSessionsImpl;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarQubeVersion;
import org.sonar.api.config.EmailSettings;
@@ -247,6 +248,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer {
// DB
DaoModule.class,
ReadOnlyPropertiesDao.class,
+ DBSessionsImpl.class,
DbClient.class,
// Elasticsearch
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index 9b009c3452f..b9eec535920 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -134,7 +134,7 @@ public class ComputeEngineContainerImplTest {
);
assertThat(picoContainer.getParent().getParent().getParent().getComponentAdapters()).hasSize(
COMPONENTS_IN_LEVEL_1_AT_CONSTRUCTION
- + 24 // level 1
+ + 25 // level 1
+ 47 // content of DaoModule
+ 3 // content of EsSearchModule
+ 58 // content of CorePropertyDefinitions