summaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-03-16 13:42:31 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-03-21 16:44:05 +0100
commit37e32de9c0fb62c14bff9f750332324d542c9cee (patch)
treec0798dc7fd73405849f74f6dd196294bc7598eda /sonar-core
parenta9a7a8a7a6b0b0aa1b59db3206c668cbf129da7e (diff)
downloadsonarqube-37e32de9c0fb62c14bff9f750332324d542c9cee.tar.gz
sonarqube-37e32de9c0fb62c14bff9f750332324d542c9cee.zip
SONAR-6732 CE must load Settings from DB for each worker
renamed ServerSettings to WebServerSettings and extract from it a ServerSetting interface to be able to easily provide separte implementations for Web Server and CE) CE Server implementation is called ComputeEngineSettings which supports loading up to date Settings for a specific worker using delegation and a ThreadLocal
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java
index 5162e6a8d40..597311caf07 100644
--- a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java
+++ b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java
@@ -90,10 +90,15 @@ public class ComponentContainer implements ContainerPopulator.Container {
}
protected ComponentContainer(MutablePicoContainer picoContainer) {
+ this(picoContainer, new PropertyDefinitions());
+ }
+
+ protected ComponentContainer(MutablePicoContainer picoContainer, PropertyDefinitions propertyDefinitions) {
+ requireNonNull(propertyDefinitions, "PropertyDefinitions can not be null");
this.parent = null;
this.pico = picoContainer;
this.componentKeys = new ComponentKeys();
- propertyDefinitions = new PropertyDefinitions();
+ this.propertyDefinitions = propertyDefinitions;
addSingleton(propertyDefinitions);
addSingleton(this);
}