From 37e32de9c0fb62c14bff9f750332324d542c9cee Mon Sep 17 00:00:00 2001 From: Sébastien Lesaint Date: Wed, 16 Mar 2016 13:42:31 +0100 Subject: 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 --- .../src/main/java/org/sonar/core/platform/ComponentContainer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sonar-core') 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); } -- cgit v1.2.3