You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2014/12/15 00:50:56 UTC

[1/3] incubator-tamaya git commit: TAMAYA-26: replaced creation methods with of(XXX) in PropertySourceBuilder. TAMAYA-3: Updated documentation. TAMAYA-25: Adapted component loading.

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 9ac2684f8 -> c6fa7c677


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/env/SystemClassLoaderEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/env/SystemClassLoaderEnvironmentProvider.java b/core/src/main/java/org/apache/tamaya/core/internal/env/SystemClassLoaderEnvironmentProvider.java
index 2f941a4..d455bce 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/env/SystemClassLoaderEnvironmentProvider.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/env/SystemClassLoaderEnvironmentProvider.java
@@ -23,7 +23,7 @@ import org.apache.tamaya.Stage;
 import org.apache.tamaya.core.config.ConfigurationFormats;
 import org.apache.tamaya.core.env.EnvironmentBuilder;
 import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.apache.tamaya.core.spi.EnvironmentProvider;
 import org.apache.tamaya.core.resource.ResourceLoader;
@@ -59,7 +59,7 @@ public class SystemClassLoaderEnvironmentProvider implements EnvironmentProvider
         if(env!=null){
             return env;
         }
-        List<Resource> propertyResources = Bootstrap.getService(ResourceLoader.class).getResources(ClassLoader.getSystemClassLoader(),
+        List<Resource> propertyResources = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(ClassLoader.getSystemClassLoader(),
                 "classpath:META-INF/env/system.properties", "classpath:META-INF/env/system.xml", "classpath:META-INF/env/system.ini");
         EnvironmentBuilder builder = EnvironmentBuilder.of("system", getEnvironmentType());
         for(Resource resource:propertyResources){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/format/DefaultConfigFormatsSingletonSpi.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/format/DefaultConfigFormatsSingletonSpi.java b/core/src/main/java/org/apache/tamaya/core/internal/format/DefaultConfigFormatsSingletonSpi.java
index 31d226a..0bf5728 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/format/DefaultConfigFormatsSingletonSpi.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/format/DefaultConfigFormatsSingletonSpi.java
@@ -25,7 +25,7 @@ import org.apache.tamaya.core.spi.ConfigurationFormatsSingletonSpi;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 
 /**
  * Singleton accessor to access registered reader mechanism.
@@ -35,7 +35,7 @@ public final class DefaultConfigFormatsSingletonSpi implements ConfigurationForm
     public ConfigurationFormat getFormat(String formatName){
         Objects.requireNonNull(formatName);
         try {
-            for (ConfigurationFormat configFormat : Bootstrap.getServices(ConfigurationFormat.class)) {
+            for (ConfigurationFormat configFormat : ServiceContext.getInstance().getServices(ConfigurationFormat.class)) {
                 if(formatName.equals(configFormat.getFormatName())){
                     return configFormat;
                 }
@@ -50,7 +50,7 @@ public final class DefaultConfigFormatsSingletonSpi implements ConfigurationForm
     public Collection<String> getFormatNames(){
         Set<String> result = new HashSet<>();
         try {
-            result.addAll(Bootstrap.getServices(ConfigurationFormat.class).stream().map(ConfigurationFormat::getFormatName)
+            result.addAll(ServiceContext.getInstance().getServices(ConfigurationFormat.class).stream().map(ConfigurationFormat::getFormatName)
                     .collect(Collectors.toList()));
         } catch (Exception e) {
             // TODO: handle exception
@@ -62,7 +62,7 @@ public final class DefaultConfigFormatsSingletonSpi implements ConfigurationForm
 	public ConfigurationFormat getFormat(Resource resource) {
         Objects.requireNonNull(resource);
         try {
-            for (ConfigurationFormat configFormat : Bootstrap.getServices(ConfigurationFormat.class)) {
+            for (ConfigurationFormat configFormat : ServiceContext.getInstance().getServices(ConfigurationFormat.class)) {
                 if(configFormat.isAccepted(resource)){
                     return configFormat;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
index 15050f5..50c0402 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
@@ -22,7 +22,7 @@ import org.apache.tamaya.core.spi.PathResolver;
 import org.apache.tamaya.core.resource.Resource;
 import org.apache.tamaya.core.resource.ResourceLoader;
 
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 
 import java.util.*;
 import java.util.logging.Level;
@@ -38,7 +38,7 @@ public class DefaultPathResourceLoader implements ResourceLoader{
 
     @Override
     public Collection<String> getResolverIds(){
-        return Bootstrap.getServices(PathResolver.class).stream().map(PathResolver::getResolverId)
+        return ServiceContext.getInstance().getServices(PathResolver.class).stream().map(PathResolver::getResolverId)
                 .collect(Collectors.toSet());
     }
 
@@ -68,7 +68,7 @@ public class DefaultPathResourceLoader implements ResourceLoader{
     @Override
     public List<Resource> getResources(ClassLoader classLoader, Collection<String> expressions){
         List<Resource> resources = new ArrayList<>();
-        for(PathResolver resolver : Bootstrap.getServices(PathResolver.class)){
+        for(PathResolver resolver : ServiceContext.getInstance().getServices(PathResolver.class)){
             try{
                 resources.addAll(resolver.resolve(classLoader, expressions));
             }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AbstractResource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AbstractResource.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AbstractResource.java
index a8a3ba3..a1c91a5 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AbstractResource.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AbstractResource.java
@@ -173,7 +173,7 @@ public abstract class AbstractResource implements Resource {
 	 */
 	@Override
 	public Resource createRelative(String relativePath) throws IOException {
-		throw new FileNotFoundException("Cannot create a relative resource for " + getDescription());
+		throw new FileNotFoundException("Cannot of a relative resource for " + getDescription());
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/resources/io/ClassUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/ClassUtils.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/ClassUtils.java
index d83e6d0..82b9d6e 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/ClassUtils.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/ClassUtils.java
@@ -1141,7 +1141,7 @@ public class ClassUtils {
 //	 * implementing the given interfaces in one single Class.
 //	 * <p>This implementation builds a JDK proxy class for the given interfaces.
 //	 * @param interfaces the interfaces to merge
-//	 * @param classLoader the ClassLoader to create the composite Class in
+//	 * @param classLoader the ClassLoader to of the composite Class in
 //	 * @return the merged interface as Class
 //	 * @see java.lang.reflect.Proxy#getProxyClass
 //	 */

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/properties/AbstractClasspathAwarePropertySource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/AbstractClasspathAwarePropertySource.java b/core/src/main/java/org/apache/tamaya/core/properties/AbstractClasspathAwarePropertySource.java
index e35dfd4..ab8c2ab 100644
--- a/core/src/main/java/org/apache/tamaya/core/properties/AbstractClasspathAwarePropertySource.java
+++ b/core/src/main/java/org/apache/tamaya/core/properties/AbstractClasspathAwarePropertySource.java
@@ -19,7 +19,7 @@
 package org.apache.tamaya.core.properties;
 
 import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.resource.ResourceLoader;
 
 import org.apache.tamaya.MetaInfo;
@@ -52,7 +52,7 @@ public abstract class AbstractClasspathAwarePropertySource extends AbstractPrope
                       .build());
         Objects.requireNonNull(sources, "sources required.");
         Objects.requireNonNull(sourceExpression, "sourceExpression required.");
-        List<Resource> resources = Bootstrap.getService(ResourceLoader.class).getResources(classLoader, sourceExpression);
+        List<Resource> resources = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(classLoader, sourceExpression);
         for(Resource res : resources){
             addSource(res.toString());
         }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertySource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertySource.java b/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertySource.java
index 39daabf..b0fb90c 100644
--- a/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertySource.java
+++ b/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertySource.java
@@ -19,7 +19,6 @@
 package org.apache.tamaya.core.properties;
 
 import org.apache.tamaya.*;
-import org.apache.tamaya.core.properties.AbstractPropertySource;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -37,7 +36,7 @@ class IntersectingPropertySource extends AbstractPropertySource {
     public IntersectingPropertySource(MetaInfo metaInfo, AggregationPolicy policy, List<PropertySource> providers) {
         super(MetaInfoBuilder.of(metaInfo).setType("intersection").build());
         this.providers = new ArrayList<>(providers);
-        aggregatedDelegate = PropertySourceBuilder.create(getMetaInfo()).withAggregationPolicy(policy)
+        aggregatedDelegate = PropertySourceBuilder.of(getMetaInfo()).withAggregationPolicy(policy)
                 .addProviders(this.providers).build();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertySource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertySource.java b/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertySource.java
index e6ea041..0c23394 100644
--- a/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertySource.java
+++ b/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertySource.java
@@ -20,16 +20,15 @@ package org.apache.tamaya.core.properties;
 
 import org.apache.tamaya.*;
 import org.apache.tamaya.core.config.ConfigurationFormats;
-import org.apache.tamaya.core.properties.AbstractPropertySource;
 import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.apache.tamaya.core.resource.ResourceLoader;
 
 import java.util.*;
 
 /**
- * Created by Anatole on 16.10.2014.
+ * Implementation of a PropertySource that reads configuration from some given resource paths.
  */
 final class PathBasedPropertySource extends AbstractPropertySource {
 
@@ -54,7 +53,7 @@ final class PathBasedPropertySource extends AbstractPropertySource {
         List<String> effectivePaths = new ArrayList<>();
         paths.forEach((path) -> {
             effectivePaths.add(path);
-            for (Resource res : Bootstrap.getService(ResourceLoader.class).getResources(path)) {
+            for (Resource res : ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(path)) {
                 ConfigurationFormat format = ConfigurationFormats.getFormat(res);
                 if (format != null) {
                     try {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/properties/PropertySourceBuilder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/PropertySourceBuilder.java b/core/src/main/java/org/apache/tamaya/core/properties/PropertySourceBuilder.java
index 2347712..3c96e84 100644
--- a/core/src/main/java/org/apache/tamaya/core/properties/PropertySourceBuilder.java
+++ b/core/src/main/java/org/apache/tamaya/core/properties/PropertySourceBuilder.java
@@ -86,7 +86,7 @@ public final class PropertySourceBuilder {
      * @param provider the base provider to be used, not null.
      * @return a new builder instance, never null.
      */
-    public static PropertySourceBuilder create(PropertySource provider) {
+    public static PropertySourceBuilder of(PropertySource provider) {
         return new PropertySourceBuilder(provider);
     }
 
@@ -96,7 +96,7 @@ public final class PropertySourceBuilder {
      * @param metaInfo the meta information, not null.
      * @return a new builder instance, never null.
      */
-    public static PropertySourceBuilder create(MetaInfo metaInfo) {
+    public static PropertySourceBuilder of(MetaInfo metaInfo) {
         return new PropertySourceBuilder(metaInfo);
     }
 
@@ -106,7 +106,7 @@ public final class PropertySourceBuilder {
      * @param name the provider name, not null.
      * @return a new builder instance, never null.
      */
-    public static PropertySourceBuilder create(String name) {
+    public static PropertySourceBuilder of(String name) {
         return new PropertySourceBuilder(Objects.requireNonNull(name));
     }
 
@@ -115,7 +115,7 @@ public final class PropertySourceBuilder {
      *
      * @return a new builder instance, never null.
      */
-    public static PropertySourceBuilder create() {
+    public static PropertySourceBuilder of() {
         return new PropertySourceBuilder("<noname>");
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/spi/ConfigurationProviderSpi.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/spi/ConfigurationProviderSpi.java b/core/src/main/java/org/apache/tamaya/core/spi/ConfigurationProviderSpi.java
index 09eb8f9..e60a53d 100644
--- a/core/src/main/java/org/apache/tamaya/core/spi/ConfigurationProviderSpi.java
+++ b/core/src/main/java/org/apache/tamaya/core/spi/ConfigurationProviderSpi.java
@@ -21,7 +21,7 @@ package org.apache.tamaya.core.spi;
 import org.apache.tamaya.Configuration;
 
 /**
-* This configuration provider SPI allows to register the effective factory logic to create and manage a configuration
+* This configuration provider SPI allows to register the effective factory logic to of and manage a configuration
 * instance. Hereby the qualifiers determine the type current configuration. By default
 */
 public interface ConfigurationProviderSpi{

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/spi/EnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/spi/EnvironmentProvider.java b/core/src/main/java/org/apache/tamaya/core/spi/EnvironmentProvider.java
index b40cbb6..0d42b8b 100644
--- a/core/src/main/java/org/apache/tamaya/core/spi/EnvironmentProvider.java
+++ b/core/src/main/java/org/apache/tamaya/core/spi/EnvironmentProvider.java
@@ -43,7 +43,7 @@ public interface EnvironmentProvider {
     boolean isEnvironmentActive();
 
     /**
-     * Access (or create) a new environment for the given context.
+     * Access (or of) a new environment for the given context.
      * @param parentEnvironment the parent environment to b e set
      * @return the environment, or null.
      */

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/JavaOneDemo.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/JavaOneDemo.java b/core/src/test/java/org/apache/tamaya/JavaOneDemo.java
index 9182c57..fb66970 100644
--- a/core/src/test/java/org/apache/tamaya/JavaOneDemo.java
+++ b/core/src/test/java/org/apache/tamaya/JavaOneDemo.java
@@ -36,7 +36,7 @@ public class JavaOneDemo {
 
     @Test
     public void testFromSystemProperties() {
-        PropertySource prov = PropertySourceBuilder.create("Sys-conf").addSystemProperties().build();
+        PropertySource prov = PropertySourceBuilder.of("Sys-conf").addSystemProperties().build();
         assertNotNull(prov);
         for (Map.Entry<Object, Object> en : System.getProperties().entrySet()) {
             assertEquals(en.getValue(), prov.get(en.getKey().toString()).get());
@@ -45,7 +45,7 @@ public class JavaOneDemo {
 
     @Test
     public void testProgrammatixPropertySet() {
-        System.out.println(PropertySourceBuilder.create("test").addPaths("test", "classpath:test.properties"));
+        System.out.println(PropertySourceBuilder.of("test").addPaths("test", "classpath:test.properties"));
     }
 
     @Test
@@ -54,7 +54,7 @@ public class JavaOneDemo {
         Map<String, String> cfgMap = new HashMap<>();
         cfgMap.put("param1", "value1");
         cfgMap.put("a", "Adrian"); // overrides Anatole
-        Configuration config = PropertySourceBuilder.create("myTestConfig").addPaths(
+        Configuration config = PropertySourceBuilder.of("myTestConfig").addPaths(
                 "classpath:test.properties").addPaths("classpath:cfg/test.xml")
                 .addArgs(new String[]{"-arg1", "--fullarg", "fullValue", "-myflag"})
                 .addMap(cfgMap).build().toConfiguration();
@@ -70,6 +70,6 @@ public class JavaOneDemo {
         System.out.print("--- b=");
         System.out.println(config.get("b"));
         System.out.println("--- only a,b,c)");
-        System.out.println(PropertySourceBuilder.create(config).filter((f) -> f.equals("a") || f.equals("b") || f.equals("c")).build());
+        System.out.println(PropertySourceBuilder.of(config).filter((f) -> f.equals("a") || f.equals("b") || f.equals("c")).build());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/core/properties/PropertySourceBuilderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/core/properties/PropertySourceBuilderTest.java b/core/src/test/java/org/apache/tamaya/core/properties/PropertySourceBuilderTest.java
index d6a4a4b..4a846f9 100644
--- a/core/src/test/java/org/apache/tamaya/core/properties/PropertySourceBuilderTest.java
+++ b/core/src/test/java/org/apache/tamaya/core/properties/PropertySourceBuilderTest.java
@@ -33,7 +33,7 @@ public class PropertySourceBuilderTest {
 
     @Test
     public void testFromEnvironmentProperties(){
-        PropertySource prov = PropertySourceBuilder.create("test").addEnvironmentProperties().build();
+        PropertySource prov = PropertySourceBuilder.of("test").addEnvironmentProperties().build();
         assertNotNull(prov);
         for(Map.Entry<String,String> en:System.getenv().entrySet()){
             assertEquals(en.getValue(), prov.get(en.getKey()).get());
@@ -42,7 +42,7 @@ public class PropertySourceBuilderTest {
 
     @Test
     public void testFromSystemProperties(){
-        PropertySource prov = PropertySourceBuilder.create("test").addSystemProperties().build();
+        PropertySource prov = PropertySourceBuilder.of("test").addSystemProperties().build();
         assertNotNull(prov);
         for(Map.Entry<Object,Object> en:System.getProperties().entrySet()){
             assertEquals(en.getValue(), prov.get(en.getKey().toString()).get());

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/internal/MutableTestConfigProvider.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/internal/MutableTestConfigProvider.java b/core/src/test/java/org/apache/tamaya/internal/MutableTestConfigProvider.java
index 8c8f0c0..226faf9 100644
--- a/core/src/test/java/org/apache/tamaya/internal/MutableTestConfigProvider.java
+++ b/core/src/test/java/org/apache/tamaya/internal/MutableTestConfigProvider.java
@@ -48,7 +48,7 @@ public class MutableTestConfigProvider implements ConfigurationProviderSpi{
         dataMap.put("sons.1", "Robin");
         dataMap.put("sons.2", "Luke");
         dataMap.put("sons.3", "Benjamin");
-        PropertySource provider = PropertySourceBuilder.create(CONFIG_NAME).addMap(dataMap).build();
+        PropertySource provider = PropertySourceBuilder.of(CONFIG_NAME).addMap(dataMap).build();
         testConfig = new MutableConfiguration(dataMap, MetaInfo.of(CONFIG_NAME));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/internal/TestConfigProvider.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/internal/TestConfigProvider.java b/core/src/test/java/org/apache/tamaya/internal/TestConfigProvider.java
index 768ac9d..60e6cb8 100644
--- a/core/src/test/java/org/apache/tamaya/internal/TestConfigProvider.java
+++ b/core/src/test/java/org/apache/tamaya/internal/TestConfigProvider.java
@@ -22,7 +22,7 @@ import org.apache.tamaya.core.properties.PropertySourceBuilder;
 import org.apache.tamaya.core.spi.ConfigurationProviderSpi;
 
 import org.apache.tamaya.Configuration;
-import org.apache.tamaya.MetaInfoBuilder;
+
 import java.util.*;
 
 /**
@@ -47,7 +47,7 @@ public class TestConfigProvider implements ConfigurationProviderSpi{
         config.put("BD", "123456789123456789123456789123456789.123456789123456789123456789123456789");
         config.put("testProperty", "value current testProperty");
         config.put("runtimeVersion", "${java.version}");
-        testConfig = PropertySourceBuilder.create("test").addMap(
+        testConfig = PropertySourceBuilder.of("test").addMap(
                 config).build().toConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/simple/SimplePropertiesAndCLISample.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/simple/SimplePropertiesAndCLISample.java b/core/src/test/java/org/apache/tamaya/simple/SimplePropertiesAndCLISample.java
index d6cd23a..80a6fb1 100644
--- a/core/src/test/java/org/apache/tamaya/simple/SimplePropertiesAndCLISample.java
+++ b/core/src/test/java/org/apache/tamaya/simple/SimplePropertiesAndCLISample.java
@@ -19,7 +19,6 @@
 package org.apache.tamaya.simple;
 
 import org.apache.tamaya.core.config.ConfigurationFormats;
-import org.apache.tamaya.AggregationPolicy;
 import org.apache.tamaya.core.properties.PropertySourceBuilder;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.junit.Test;
@@ -41,7 +40,7 @@ public class SimplePropertiesAndCLISample {
 
     @Test
     public void testProgrammatixPropertySet() {
-        System.out.println(PropertySourceBuilder.create("test").addPaths("test", "classpath:test.properties").build());
+        System.out.println(PropertySourceBuilder.of("test").addPaths("test", "classpath:test.properties").build());
     }
 
     @Test
@@ -50,7 +49,7 @@ public class SimplePropertiesAndCLISample {
         Map<String, String> cfgMap = new HashMap<>();
         cfgMap.put("param1", "value1");
         cfgMap.put("a", "Adrian"); // overrides Anatole
-        Configuration config = PropertySourceBuilder.create("myTestConfig").addPaths(
+        Configuration config = PropertySourceBuilder.of("myTestConfig").addPaths(
                 "classpath:test.properties").addPaths("classpath:cfg/test.xml")
                 .addArgs(new String[]{"-arg1", "--fullarg", "fullValue", "-myflag"}).addMap(cfgMap)
                 .build().toConfiguration();
@@ -66,7 +65,7 @@ public class SimplePropertiesAndCLISample {
         System.out.print("--- b=");
         System.out.println(config.get("b"));
         System.out.println("--- only a,b,c)");
-        System.out.println(PropertySourceBuilder.create(config).filter((f) -> f.equals("a") || f.equals("b") || f.equals("c")).build());
+        System.out.println(PropertySourceBuilder.of(config).filter((f) -> f.equals("a") || f.equals("b") || f.equals("c")).build());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/ucs/UC1ReadProperties.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/ucs/UC1ReadProperties.java b/core/src/test/java/org/apache/tamaya/ucs/UC1ReadProperties.java
index 54e1491..c487bdb 100644
--- a/core/src/test/java/org/apache/tamaya/ucs/UC1ReadProperties.java
+++ b/core/src/test/java/org/apache/tamaya/ucs/UC1ReadProperties.java
@@ -60,7 +60,7 @@ public class UC1ReadProperties {
 
     @Test
     public void example() {
-        Configuration config = PropertySourceBuilder.create("test")
+        Configuration config = PropertySourceBuilder.of("test")
                 .addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build().toConfiguration();
         String name = config.get("name").orElse("Anatole");
         BigDecimal bigNum = config.get("num.BD", BigDecimal.class).orElseThrow(() -> new IllegalStateException("Sorry"));
@@ -75,13 +75,13 @@ public class UC1ReadProperties {
         Map<String, String> areaMap = config.toMap().entrySet().stream()
                 .filter((e) -> e.getKey().startsWith("num."))
                 .collect(Collectors.toMap((e) -> e.getKey().substring("num.".length()), Map.Entry::getValue));
-        Configuration areaConfig = PropertySourceBuilder.create("Test").addMap(areaMap).build().toConfiguration();
+        Configuration areaConfig = PropertySourceBuilder.of("Test").addMap(areaMap).build().toConfiguration();
         System.out.println(areaConfig);
     }
 
     @Test
     public void getConfigurationTest() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:barFoo.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:barFoo.properties").build();
         Configuration config = provider.toConfiguration();
         assertNotNull(config);
         assertTrue(config.isEmpty());
@@ -91,7 +91,7 @@ public class UC1ReadProperties {
 
     @Test
     public void readBadPropertiesTest() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:barFoo.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:barFoo.properties").build();
         assertNotNull(provider);
         assertTrue(provider.isEmpty());
         assertTrue(provider.keySet().isEmpty());
@@ -100,7 +100,7 @@ public class UC1ReadProperties {
 
     @Test
     public void readPropertiesTest() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         assertNotNull(provider);
         assertEquals(provider.get("a").get(), "aValue");
         assertEquals(provider.get("b").get(), "bValue");
@@ -124,7 +124,7 @@ public class UC1ReadProperties {
 
     @Test
     public void readXmlPropertiesTest() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.xml").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.xml").build();
         assertNotNull(provider);
         assertEquals(provider.get("a-xml").get(), "aFromXml");
         assertEquals(provider.get("b-xml").get(), "bFromXml");
@@ -133,7 +133,7 @@ public class UC1ReadProperties {
 
     @Test
     public void readIniPropertiesTest() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.ini").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.ini").build();
         assertNotNull(provider);
         assertEquals(provider.get("a.b.c").get(), "abcValue-fromIni");
         assertEquals(provider.get("a.b.b").get(), "abbValue-fromIni");
@@ -145,7 +145,7 @@ public class UC1ReadProperties {
 
     @Test
     public void readAllPropertiesTest() {
-        PropertySource provider = PropertySourceBuilder.create("Test").withAggregationPolicy(AggregationPolicy.IGNORE_DUPLICATES)
+        PropertySource provider = PropertySourceBuilder.of("Test").withAggregationPolicy(AggregationPolicy.IGNORE_DUPLICATES)
                 .addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.*").build();
         assertNotNull(provider);
         // fromMap ini file
@@ -161,7 +161,7 @@ public class UC1ReadProperties {
 
     @Test
     public void checkForAValue() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         assertFalse(provider.containsKey("blabla"));
         assertTrue(provider.containsKey("num.BD"));
         assertFalse(provider.get("blabla").isPresent());
@@ -170,7 +170,7 @@ public class UC1ReadProperties {
 
     @Test
     public void checkKeys() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         assertEquals(provider.keySet().size(), 16);
         assertTrue(provider.keySet().contains("boolean"));
         assertFalse(provider.keySet().contains("blabla"));
@@ -178,7 +178,7 @@ public class UC1ReadProperties {
 
     @Test
     public void checkToMap() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         Map<String, String> map = provider.toMap();
         assertNotNull(map);
         assertEquals(map.size(), 16);
@@ -189,34 +189,34 @@ public class UC1ReadProperties {
 
     @Test
     public void checkMetaInfo() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         MetaInfo meta = provider.getMetaInfo();
         assertNotNull(meta);
     }
 
     @Test
     public void checkNeverNull() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         assertNotNull(provider.get("blabla"));
         assertNotNull(provider.get("a.b.c"));
     }
 
     @Test
     public void checkUndefined() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         assertFalse(provider.get("blabla").isPresent());
         assertTrue(provider.get("a.b.c").isPresent());
     }
 
     @Test
     public void checkPassDefaultValues() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         assertEquals("myDefaultValue", provider.get("blabla").orElse("myDefaultValue"));
     }
 
     @Test(expected = IllegalStateException.class)
     public void checkThrowCustomException() {
-        PropertySource provider = PropertySourceBuilder.create("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
+        PropertySource provider = PropertySourceBuilder.of("Test").addPaths("classpath:ucs/UC1ReadProperties/UC1ReadPropertiesTest.properties").build();
         provider.get("blabla").orElseThrow(() -> new IllegalStateException("checkThrowCustomException"));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/test/java/org/apache/tamaya/ucs/UC2CombineProperties.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/tamaya/ucs/UC2CombineProperties.java b/core/src/test/java/org/apache/tamaya/ucs/UC2CombineProperties.java
index a463c31..993048b 100644
--- a/core/src/test/java/org/apache/tamaya/ucs/UC2CombineProperties.java
+++ b/core/src/test/java/org/apache/tamaya/ucs/UC2CombineProperties.java
@@ -38,16 +38,16 @@ public class UC2CombineProperties {
      */
     @Test
     public void simpleAggregationTests() {
-        PropertySource props1 = PropertySourceBuilder.create().addPaths("classpath:ucs/UC2CombineProperties/props1.properties").build();
-        PropertySource props2 = PropertySourceBuilder.create().addPaths("classpath:ucs/UC2CombineProperties/props2.properties").build();
-        PropertySource unionOverriding = PropertySourceBuilder.create(props1).withAggregationPolicy(AggregationPolicy.OVERRIDE).addProviders(props2).build();
+        PropertySource props1 = PropertySourceBuilder.of().addPaths("classpath:ucs/UC2CombineProperties/props1.properties").build();
+        PropertySource props2 = PropertySourceBuilder.of().addPaths("classpath:ucs/UC2CombineProperties/props2.properties").build();
+        PropertySource unionOverriding = PropertySourceBuilder.of(props1).withAggregationPolicy(AggregationPolicy.OVERRIDE).addProviders(props2).build();
         System.out.println("unionOverriding: " + unionOverriding);
-        PropertySource unionIgnoringDuplicates = PropertySourceBuilder.create(props1).withAggregationPolicy(AggregationPolicy.IGNORE_DUPLICATES).addProviders(props2).build();
+        PropertySource unionIgnoringDuplicates = PropertySourceBuilder.of(props1).withAggregationPolicy(AggregationPolicy.IGNORE_DUPLICATES).addProviders(props2).build();
         System.out.println("unionIgnoringDuplicates: " + unionIgnoringDuplicates);
-        PropertySource unionCombined = PropertySourceBuilder.create(props1).withAggregationPolicy(AggregationPolicy.COMBINE).addProviders(props2).build();
+        PropertySource unionCombined = PropertySourceBuilder.of(props1).withAggregationPolicy(AggregationPolicy.COMBINE).addProviders(props2).build();
         System.out.println("unionCombined: " + unionCombined);
         try{
-            PropertySourceBuilder.create(props1).withAggregationPolicy(AggregationPolicy.EXCEPTION).addProviders(props2).build();
+            PropertySourceBuilder.of(props1).withAggregationPolicy(AggregationPolicy.EXCEPTION).addProviders(props2).build();
         }
         catch(ConfigException e){
             // expected!
@@ -59,9 +59,9 @@ public class UC2CombineProperties {
      */
     @Test
     public void dynamicAggregationTests() {
-        PropertySource props1 = PropertySourceBuilder.create().addPaths("classpath:ucs/UC2CombineProperties/props1.properties").build();
-        PropertySource props2 = PropertySourceBuilder.create().addPaths("classpath:ucs/UC2CombineProperties/props2.properties").build();
-        PropertySource props = PropertySourceBuilder.create().withAggregationPolicy((k, v1, v2) -> (v1 != null ? v1 : "") + '[' + v2 + "]").withMetaInfo(MetaInfo.of("dynamicAggregationTests"))
+        PropertySource props1 = PropertySourceBuilder.of().addPaths("classpath:ucs/UC2CombineProperties/props1.properties").build();
+        PropertySource props2 = PropertySourceBuilder.of().addPaths("classpath:ucs/UC2CombineProperties/props2.properties").build();
+        PropertySource props = PropertySourceBuilder.of().withAggregationPolicy((k, v1, v2) -> (v1 != null ? v1 : "") + '[' + v2 + "]").withMetaInfo(MetaInfo.of("dynamicAggregationTests"))
                 .aggregate(props1, props2).build();
         System.out.println(props);
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/docs/design/2_CoreConcepts.adoc
----------------------------------------------------------------------
diff --git a/docs/design/2_CoreConcepts.adoc b/docs/design/2_CoreConcepts.adoc
index db949ac..41c2311 100644
--- a/docs/design/2_CoreConcepts.adoc
+++ b/docs/design/2_CoreConcepts.adoc
@@ -23,7 +23,7 @@ the base of all the other mechanisms:
 The API contains the following core concepts/artifacts:
 
 * Literal Key/Value Pairs
-* _PropertyProvider:_ is the the SPI for a source that provides configuration data. A +PropertyProvider+
+* _PropertySource:_ is the the SPI for a source that provides configuration data. A +PropertySource+
      hereby defines
      ** a minimalistic SPI to be implemented by the config data source
      ** provides data key/value pairs in raw format as String key/values only
@@ -36,34 +36,34 @@ The API contains the following core concepts/artifacts:
      ** provides functional extension points (+with,query+)
      ** allows registering/deregistering of change listeners
      ** is the entry point for evaluating the current +Configuration+
-     ** each +PropertyProvider+ can be easily converted into a +Configuration+
+     ** each +PropertySource+ can be easily converted into a +Configuration+
      ** allows configuration entries to be injected
      ** to access configuration _templates_ (annotated interfaces).
      ** Configuration may support mutability by allowing instances of +ConfigChangeSet+ to be passed.
-* _PropertyProviders_ allows to aggregate different property providers. Hereby property providers are
-  seen as sets, which can be combined to new providers using set styled operations (aggregate, intersect, subtract).
-  This allows to model and create composite container providers, to build up more complex configuration models
+* _PropertySourceBuilder_ allows to aggregate different property sources. Hereby property sources are
+  seen as sets, which can be combined to new sources using set styled operations (aggregation, intersection, subtraction).
+  This allows to model and create composite sources, to build up more complex configuration models
   step by step.
-* _MetaInfo_ is provided by each +Configuration, PropertyProvider+ and describes the configuration/provider and its entries.
+* _MetaInfo_ is provided by each +Configuration, PropertySource+ and describes the configuration/provider and its entries.
 * _Environment_ is the base model for modelling the environment and the accessor for getting the current +Environment+ instance.
 * _Annotations_ a set of annotations allows to configure configuration injection on classes or interface (aka config templates).
 
 The SPI contains the following core concepts/artifacts:
 
-* _Bootstrap_ is the delegate singleton that is used by the framework to resolve components. The effective component
-  loading can be accessed by implementing and registering an instance of +ServiceProvider+ using +java.util.ServiceLoader+.
-* All the singleton used explicitly (+PropertyAdapters,PropertyProviders+ are backed up corresponding API interfaces.
+* _ServiceContext_ is the delegate singleton that is used by the framework to resolve components. The effective component
+  loading can be accessed by implementing and registering an instance of +ServiceContextProvider+ using +java.util.ServiceLoader+.
+* All the singleton used explicitly (+PropertyAdapters,Configuration+ are backed up corresponding API interfaces.
   To override a singleton's behaviour the corresponding SPI has to be implemented and registered, so it can be loaded
-  by the current +Bootstrap+ setup (by default ServiceLoader based).
-* Also the singleton used implicitly by +Configuration, Environment, Stage+ are backed up corresponding SPI interfaces.
+  by the current +ServiceContext+ setup (by default ServiceLoader based).
+* Also the singleton used implicitly by +Configuration, Environment+ are backed up corresponding SPI interfaces.
   To override a singleton's behaviour the corresponding SPI has to be implemented and registered, so it can be loaded
-  by the current +Bootstrap+ setup (by default ServiceLoader based).
+  by the current +ServiceContext+ setup (by default ServiceLoader based).
 
 This is also reflected in the main parts of the API, which is quite small:
 
-* +org.apache.tamaya+ contains the main abstractions +Configuration, ConfigOperator, ConfigQuery, PropertyAdapter, Stage,
-  Environment, PropertyProvider, MetaInfo+
-* +org.apache.tamaya.spi+ contains the SPI interfaces to be implemented by implementations and the +Bootstrap+ mechanism.
+* +org.apache.tamaya+ contains the main abstractions +Configuration, ConfigQuery, PropertyAdapter, Stage,
+  Environment, PropertySource, MetaInfo+
+* +org.apache.tamaya.spi+ contains the SPI interfaces to be implemented by implementations and the +ServiceContext+ mechanism.
 + +org.apache.tamaya.annot+ contains the annotations defined.
 
 In the implementation are there are additional projects:
@@ -200,20 +200,20 @@ Nevertheless most of these advantages can be mitigated easily, hereby still keep
 ** The keys of configuration can have additional syntax/semantics. E.g. when adding dor-separating path semantics
 *** trees/maps can also simply be mapped.
 
-[APIPropertyProviders]
-=== Property Providers
+[APIPropertySources]
+=== PropertySource
 ==== Basic Model
 
 We have seen that constrain configuration aspects to simple literal key/value pairs provides us with an easy to
-understand, generic, flexible, yet expendable mechanism. Looking at the Java language features a +vava.util.Map<String,
+understand, generic, flexible, yet expendable mechanism. Looking at the Java language features a +java.util.Map<String,
 String>+ and +java.util.Properties+ basically model these quite well out of the box.
-So it makes sense to build configuration on top of the JDK's +Map+ interface. This creates immediately additional
+So it would make sense to build configuration on top of the JDK's +Map+ interface. This creates immediately additional
 benefits:
 
 * we inherit full Lambda and collection support
 * Maps are widely known and well understood
 
-Nevertheless there are some things to be considered:
+Nevertheless there are some severe drawbacks:
 
 * Configuration also requires meta-data, such as
 ** the origin of a certain configuration entry and how it was derived from other values
@@ -224,12 +224,12 @@ Nevertheless there are some things to be considered:
 ** ...
 
 Basically the same is also the not related to some single configuration key, but also to a whole map.
-The +PropertyProvider+ interface models exact these aspects and looks as illustrated below:
+The +PropertySource+ interface models exact these aspects and looks as illustrated below:
 
 [source,java]
-.Interface PropertyProvider
+.Interface PropertySource
 --------------------------------------------
-public interface PropertyProvider{
+public interface PropertySource{
 
       Optional<String> get(String key);
       boolean containsKey(String key);
@@ -246,20 +246,22 @@ public interface PropertyProvider{
 Hereby
 
 * +getMetaInfo()+ return the meta information for the property provider, as well as for individual property key/value pairs.
-* +get, containsKey, keySet+ look similar to the methods on +Map+, though +get+ uses the +Optional+ type introduced
+* +get+ look similar to the methods on +Map+, though +get+ uses the +Optional+ type introduced
   with Java 8. This avoids returning +null+ or throwing exceptions in case no such entry is available and also
   reduced the API's footprint, since default values can be easily implemented by calling +Optional.orElse+.
+* +containsKey, keySet+ are as well methods similar to +java.util.Map+ though implementations may only returns
+  limited data, especially when the underlying map storage does not support iteration.
 * +isMutable()+ allows to easy check, if a property provider is mutable, which is more elegant than catching
   +NonSupportedOperation+ exception thrown on the according methods of +Map+.
 * +load()+ finally allows to (re)load a property map. It depends on the implementing source, if this operation
   has any effect. If the map changes an according +ConfigChange+ must be returned, describing the
   changes applied.
-* +hasSameProperties+ allows to perform a comparison with another provider.
-* +toMap+ allows to extract thing to a +Map+.
+* +toMap+ allows to extract thing to a +Map+. Similar to +containsKey, keySet+ implementations may only return
+  a limited data map, especially when the underlying map storage does not support iteration.
 
 This simple model will be used within the spi, where configuration can be injected/provided from external resources.
 But we have seen, that we have to consider additional aspects, such as extendability and type safety. Therefore we
-extend +PropertyMap+ and hereby also apply the 'composite pattern', which results in the following key abstraction.
+extend +PropertySource+ and hereby also apply the 'composite pattern', which results in the following key abstraction.
 
 ==== Meta Information
 
@@ -268,7 +270,7 @@ Each instance also provides an instance of +MetaInfo+, which provides meta infor
 [source,java]
 .Accessing Meta Information
 --------------------------------------------
-PropertyProvider prov = ...;
+PropertySource prov = ...;
 MetaInfo metaInfo = prov.getMetaInfo();
 Set<String> keys = metaInfo.keySet();  // returns the attribute keys, for which meta-information is accessible.
 String metaData = metaInfo.get("a.b.c.value"); // access meta information
@@ -280,32 +282,32 @@ As we have seen above there is as well a +MetaInfoBuilder+, which must be used t
 
 ==== Mutability
 
-Property providers optionally may be mutable. This can be checked by calling +boolean isMutable()+. If a provider
-is mutable a +ConfigChangeSet+ can be passed. This change set can then be applied by the provider. On creation
-of the +ConfigChangeSetBuilder+ a provider can pass version information, so _optimistic locking_ can be implemented
+Property sources optionally may be mutable. This can be checked by calling +boolean isMutable()+. If a source
+is mutable a +ConfigChangeSet+ can be passed. This change set can then be applied by the source. On creation
+of the +ConfigChangeSetBuilder+ a source can pass version information, so _optimistic locking_ can be implemented
 easily:
 
 [source,java]
-.Creating and applying a +ConfigChangeSet+ to a provider
+.Creating and applying a +ConfigChangeSet+ to a PropertySource
 --------------------------------------------
-PropertyProvider prov = ...;
+PropertySource source = ...;
 ConfigChangeSet changeSet = ConfigChangeSetBuilder.of(provider)  // creating a default version
    .remove("key1ToBeRemoved", +key2ToBeRemoved")
    .put("key2", "key2Value")
    .put("key3", 12345)
    .put("key4", 123.45)
    .build();
-provider.apply(changeSet);
+source.apply(changeSet);
 --------------------------------------------
 
-[[API CombineProviders]]
-==== Combining Property Providers
+[[API PropertySourceBuilder]]
+==== Building Property Sources
 
 Looking at the structures of configuration system used by large companies we typically encounter some kind of configuration
 hierarchies that are combined in arbitrary ways. Users of the systems are typically not aware of the complexities in this
 area, since they simply know the possible locations, formats and the overriding policies. Framework providers on the other
 side must face the complexities and it would be very useful if Tamaya can support here by providing prebuilt functionality
-that helps implementing these aspects. All this leads to the feature set of combining property providers. Hereby the following
+that helps implementing these aspects. All this leads to the feature set of combining property sources. Hereby the following
 strategies are useful:
 
 * aggregating providers, hereby later providers added
@@ -318,7 +320,7 @@ strategies are useful:
 * subtracting providers
 * filtering providers
 
-These common functionality is provided by the +PropertyProviders+ singleton. Additionally to the base strategies above a +MetaInfo+
+These common functionality is provided by the +PropertySources+ singleton. Additionally to the base strategies above a +MetaInfo+
 instance can be passed optionally as well to define the meta information for the newly created provider instances.
 Let's assume we have two property providers with the following data:
 
@@ -348,26 +350,26 @@ Looking in detail you see that the entries +a,b,c+ are present in both providers
 and +g,h,i+ only in provider 2.
 
 [source,java]
-.Example Combining PropertyProviders
+.Example Combining PropertySources
 --------------------------------------------
-PropertyProvider provider1 = ...
-PropertyProvider provider2 = ...
+PropertySource provider1 = ...
+PropertySource provider2 = ...
 
 // aggregate, hereby values from provider 2 override values from provider 1
-PropertyProvider unionOverriding = PropertyProviders.aggregate(AggregationPolicy.OVERRIDE(), provider1, provider2);
+PropertySource unionOverriding = PropertySources.aggregate(AggregationPolicy.OVERRIDE(), provider1, provider2);
 System.out.println("unionOverriding: " + unionOverriding);
 
 // ignore duplicates, values present in provider 1 are not overriden by provider 2
-PropertyProvider unionIgnoringDuplicates = PropertyProviders.aggregate(AggregationPolicy.IGNORE_DUPLICATES(), provider1, provider2);
+PropertySource unionIgnoringDuplicates = PropertySources.aggregate(AggregationPolicy.IGNORE_DUPLICATES(), provider1, provider2);
 System.out.println("unionIgnoringDuplicates: " + unionIgnoringDuplicates);
 
 // this variant combines/maps duplicate values into a new value
-PropertyProvider unionCombined = PropertyProviders.aggregate(AggregationPolicy.COMBINE(), provider1, provider2);
+PropertySource unionCombined = PropertySources.aggregate(AggregationPolicy.COMBINE(), provider1, provider2);
 System.out.println("unionCombined: " + unionCombined);
 
 // This variant throws an exception since there are key/value paris in both providers, but with different values
 try{
-    PropertyProviders.aggregate(AggregationPolicy.EXCEPTION(), provider1, provider2);
+    PropertySources.aggregate(AggregationPolicy.EXCEPTION(), provider1, provider2);
 }
 catch(ConfigException e){
     // expected!
@@ -377,9 +379,9 @@ catch(ConfigException e){
 The example above produces the following outpout:
 
 [source,listing]
-.Example Combining PropertyProviders
+.Example Combining PropertySources
 --------------------------------------------
-AggregatedPropertyProvider{
+AggregatedPropertySource{
   (name = dynamicAggregationTests)
   a = "[a][A]"
   b = "[b][B]"
@@ -391,7 +393,7 @@ AggregatedPropertyProvider{
   h = "[h]"
   i = "[i]"
 }
-unionOverriding: AggregatedPropertyProvider{
+unionOverriding: AggregatedPropertySource{
   (name = <noname>)
   a = "A"
   b = "B"
@@ -403,7 +405,7 @@ unionOverriding: AggregatedPropertyProvider{
   h = "h"
   i = "i"
 }
-unionIgnoringDuplicates: AggregatedPropertyProvider{
+unionIgnoringDuplicates: AggregatedPropertySource{
   (name = <noname>)
   a = "a"
   b = "b"
@@ -415,7 +417,7 @@ unionIgnoringDuplicates: AggregatedPropertyProvider{
   h = "h"
   i = "i"
 }
-unionCombined: AggregatedPropertyProvider{
+unionCombined: AggregatedPropertySource{
   (name = <noname>)
   a = "a,A"
   b = "b,B"
@@ -445,9 +447,9 @@ So we can also define our own aggregation strategy using a Lambda expression:
 [source,java]
 .Use a Custom AggregationPolicy
 --------------------------------------------
-PropertyProvider provider1 = ...;
-PropertyProvider provider2 = ...;
-PropertyProvider props = PropertyProviders.aggregate(
+PropertySource provider1 = ...;
+PropertySource provider2 = ...;
+PropertySource props = PropertySources.aggregate(
       (k, v1, v2) -> (v1 != null ? v1 : "") + '[' + v2 + "]",
       MetaInfo.of("dynamicAggregationTests"),
       props1, props2);
@@ -459,7 +461,7 @@ Additionally we also pass here an instance of +MetaInfo+. The output of this cod
 [source,listing]
 .Listing of dynamic aggregation policy
 --------------------------------------------
-AggregatedPropertyProvider{
+AggregatedPropertySource{
   (name = dynamicAggregationTests)
   a = "[a][A]"
   b = "[b][B]"
@@ -473,54 +475,54 @@ AggregatedPropertyProvider{
 }
 --------------------------------------------
 
-Summarizing the +PropertyProviders+ singleton allows to combine providers in various forms:
+Summarizing the +PropertySources+ singleton allows to combine providers in various forms:
 
 [source,listing]
-.Methods provided on PropertyProviders
---------------------------------------------
-public final class PropertyProviders {
-
-    private PropertyProviders() {}
-
-    public static PropertyProvider fromArgs(String... args) {
-    public static PropertyProvider fromArgs(MetaInfo metaInfo, String... args) {
-    public static PropertyProvider fromPaths(AggregationPolicy aggregationPolicy, String... paths) {
-    public static PropertyProvider fromPaths(String... paths) {
-    public static PropertyProvider fromPaths(List<String> paths) {
-    public static PropertyProvider fromPaths(AggregationPolicy aggregationPolicy, List<String> paths) {
-    public static PropertyProvider fromPaths(MetaInfo metaInfo, List<String> paths) {
-    public static PropertyProvider fromPaths(AggregationPolicy aggregationPolicy, MetaInfo metaInfo, List<String> paths) {
-    public static PropertyProvider fromUris(URI... uris) {
-    public static PropertyProvider fromUris(AggregationPolicy aggregationPolicy, URI... uris) {
-    public static PropertyProvider fromUris(List<URI> uris) {
-    public static PropertyProvider fromUris(AggregationPolicy aggregationPolicy, List<URI> uris) {
-    public static PropertyProvider fromUris(MetaInfo metaInfo, URI... uris) {
-    public static PropertyProvider fromUris(AggregationPolicy aggregationPolicy, MetaInfo metaInfo, URI... uris) {
-    public static PropertyProvider fromUris(MetaInfo metaInfo, List<URI> uris) {
-    public static PropertyProvider fromUris(AggregationPolicy aggregationPolicy, MetaInfo metaInfo, List<URI> uris) {
-    public static PropertyProvider fromMap(Map<String, String> map) {
-    public static PropertyProvider fromMap(MetaInfo metaInfo, Map<String, String> map) {
-    public static PropertyProvider empty() {
-    public static PropertyProvider emptyMutable() {
-    public static PropertyProvider empty(MetaInfo metaInfo) {
-    public static PropertyProvider emptyMutable(MetaInfo metaInfo) {
-    public static PropertyProvider fromEnvironmentProperties() {
-    public static PropertyProvider fromSystemProperties() {
-    public static PropertyProvider freezed(PropertyProvider provider) {
-    public static PropertyProvider aggregate(AggregationPolicy mapping, MetaInfo metaInfo, PropertyProvider... providers){
-    public static PropertyProvider aggregate(PropertyProvider... providers) {
-    public static PropertyProvider aggregate(List<PropertyProvider> providers) {
-    public static PropertyProvider aggregate(AggregationPolicy mapping, PropertyProvider... propertyMaps) {
-    public static PropertyProvider aggregate(AggregationPolicy mapping, List<PropertyProvider> providers) {
-    public static PropertyProvider mutable(PropertyProvider provider) {
-    public static PropertyProvider intersected(AggregationPolicy aggregationPolicy, PropertyProvider... providers) {
-    public static PropertyProvider intersected(PropertyProvider... providers) {
-    public static PropertyProvider subtracted(PropertyProvider target, PropertyProvider... providers) {
-    public static PropertyProvider filtered(Predicate<String> filter, PropertyProvider provider) {
-    public static PropertyProvider contextual(Supplier<PropertyProvider> mapSupplier,
+.Methods provided on PropertySources
+--------------------------------------------
+public final class PropertySources {
+
+    private PropertySources() {}
+
+    public static PropertySource fromArgs(String... args) {
+    public static PropertySource fromArgs(MetaInfo metaInfo, String... args) {
+    public static PropertySource fromPaths(AggregationPolicy aggregationPolicy, String... paths) {
+    public static PropertySource fromPaths(String... paths) {
+    public static PropertySource fromPaths(List<String> paths) {
+    public static PropertySource fromPaths(AggregationPolicy aggregationPolicy, List<String> paths) {
+    public static PropertySource fromPaths(MetaInfo metaInfo, List<String> paths) {
+    public static PropertySource fromPaths(AggregationPolicy aggregationPolicy, MetaInfo metaInfo, List<String> paths) {
+    public static PropertySource fromUris(URI... uris) {
+    public static PropertySource fromUris(AggregationPolicy aggregationPolicy, URI... uris) {
+    public static PropertySource fromUris(List<URI> uris) {
+    public static PropertySource fromUris(AggregationPolicy aggregationPolicy, List<URI> uris) {
+    public static PropertySource fromUris(MetaInfo metaInfo, URI... uris) {
+    public static PropertySource fromUris(AggregationPolicy aggregationPolicy, MetaInfo metaInfo, URI... uris) {
+    public static PropertySource fromUris(MetaInfo metaInfo, List<URI> uris) {
+    public static PropertySource fromUris(AggregationPolicy aggregationPolicy, MetaInfo metaInfo, List<URI> uris) {
+    public static PropertySource fromMap(Map<String, String> map) {
+    public static PropertySource fromMap(MetaInfo metaInfo, Map<String, String> map) {
+    public static PropertySource empty() {
+    public static PropertySource emptyMutable() {
+    public static PropertySource empty(MetaInfo metaInfo) {
+    public static PropertySource emptyMutable(MetaInfo metaInfo) {
+    public static PropertySource fromEnvironmentProperties() {
+    public static PropertySource fromSystemProperties() {
+    public static PropertySource freezed(PropertySource provider) {
+    public static PropertySource aggregate(AggregationPolicy mapping, MetaInfo metaInfo, PropertySource... providers){
+    public static PropertySource aggregate(PropertySource... providers) {
+    public static PropertySource aggregate(List<PropertySource> providers) {
+    public static PropertySource aggregate(AggregationPolicy mapping, PropertySource... propertyMaps) {
+    public static PropertySource aggregate(AggregationPolicy mapping, List<PropertySource> providers) {
+    public static PropertySource mutable(PropertySource provider) {
+    public static PropertySource intersected(AggregationPolicy aggregationPolicy, PropertySource... providers) {
+    public static PropertySource intersected(PropertySource... providers) {
+    public static PropertySource subtracted(PropertySource target, PropertySource... providers) {
+    public static PropertySource filtered(Predicate<String> filter, PropertySource provider) {
+    public static PropertySource contextual(Supplier<PropertySource> mapSupplier,
                                               Supplier<String> isolationKeySupplier) {
-    public static PropertyProvider delegating(PropertyProvider mainMap, Map<String, String> parentMap) {
-    public static PropertyProvider replacing(PropertyProvider mainMap, Map<String, String> replacementMap) {
+    public static PropertySource delegating(PropertySource mainMap, Map<String, String> parentMap) {
+    public static PropertySource replacing(PropertySource mainMap, Map<String, String> replacementMap) {
 }
 --------------------------------------------
 
@@ -529,13 +531,13 @@ public final class PropertyProviders {
 === Configuration
 ==== Basic Model
 
-Configuration inherits all basic features from +PropertyProvider+, but additionally adds functionality for
+Configuration inherits all basic features from +PropertySource+, but additionally adds functionality for
 type safety and extension mechanisms:
 
 [source,java]
 .Interface Configuration
 --------------------------------------------
-public interface Configuration extends PropertyProvider{
+public interface Configuration extends PropertySource{
 
     default OptionalBoolean getBoolean(String key);
     default OptionalInt getInteger(String key);
@@ -594,7 +596,7 @@ Hereby
 [[TypeConversion]]
 ==== Type Conversion
 
-Configuration extend +PropertyProvider+ and add additional support for non String types. This is achieved
+Configuration extend +PropertySource+ and add additional support for non String types. This is achieved
 with the help of +PropertyAdapter+ instances:
 
 [source,java]

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/modules/integration/cdi/src/test/java/org/apache/tamaya/integration/cdi/TestConfigProvider.java
----------------------------------------------------------------------
diff --git a/modules/integration/cdi/src/test/java/org/apache/tamaya/integration/cdi/TestConfigProvider.java b/modules/integration/cdi/src/test/java/org/apache/tamaya/integration/cdi/TestConfigProvider.java
index 8ab08ae..6c92379 100644
--- a/modules/integration/cdi/src/test/java/org/apache/tamaya/integration/cdi/TestConfigProvider.java
+++ b/modules/integration/cdi/src/test/java/org/apache/tamaya/integration/cdi/TestConfigProvider.java
@@ -49,7 +49,7 @@ public class TestConfigProvider implements ConfigurationProviderSpi
         config.put("BD", "123456789123456789123456789123456789.123456789123456789123456789123456789");
         config.put("testProperty", "value current testProperty");
         config.put("runtimeVersion", "${java.version}");
-        testConfig = PropertySourceBuilder.create("test").addMap(config).build().toConfiguration();
+        testConfig = PropertySourceBuilder.of("test").addMap(config).build().toConfiguration();
     }
 
     @Override


[2/3] incubator-tamaya git commit: TAMAYA-26: replaced creation methods with of(XXX) in PropertySourceBuilder. TAMAYA-3: Updated documentation. TAMAYA-25: Adapted component loading.

Posted by an...@apache.org.
TAMAYA-26: replaced creation methods with of(XXX) in PropertySourceBuilder.
TAMAYA-3: Updated documentation.
TAMAYA-25: Adapted component loading.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/123a4afc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/123a4afc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/123a4afc

Branch: refs/heads/master
Commit: 123a4afcb4f55873ec7a3a3327ffd0e08a26de9d
Parents: 1af5a7d
Author: anatole <an...@apache.org>
Authored: Mon Dec 15 00:48:57 2014 +0100
Committer: anatole <an...@apache.org>
Committed: Mon Dec 15 00:48:57 2014 +0100

----------------------------------------------------------------------
 .../apache/tamaya/ConfigChangeSetBuilder.java   |   2 -
 .../java/org/apache/tamaya/Configuration.java   |  27 ++-
 .../org/apache/tamaya/ConfigurationManager.java |  38 +---
 .../org/apache/tamaya/EnvironmentManager.java   |  44 +---
 .../org/apache/tamaya/PropertyAdapters.java     |  19 +-
 .../java/org/apache/tamaya/PropertySource.java  | 114 +++++-----
 .../java/org/apache/tamaya/spi/Bootstrap.java   | 156 --------------
 .../spi/ConfigurationManagerSingletonSpi.java   |   4 +-
 .../tamaya/spi/DefaultServiceComparator.java    |  85 ++++++++
 .../spi/DefaultServiceContextProvider.java      | 110 ++++++++++
 .../tamaya/spi/DefaultServiceProvider.java      |  87 --------
 .../java/org/apache/tamaya/spi/Orderable.java   |   9 +
 .../org/apache/tamaya/spi/OrdinalProvider.java  |  19 ++
 .../org/apache/tamaya/spi/ServiceContext.java   |  95 +++++++++
 .../tamaya/spi/ServiceContextManager.java       | 100 +++++++++
 .../org/apache/tamaya/spi/ServiceProvider.java  |  57 -----
 .../core/config/AbstractConfiguration.java      |  16 +-
 .../tamaya/core/config/ConfigFunctions.java     |   4 +-
 .../core/config/ConfigurationFormats.java       |  43 +---
 .../core/config/FreezedConfiguration.java       |   2 +-
 .../apache/tamaya/core/internal/MetaConfig.java |   4 +-
 ...DefaultConfigurationManagerSingletonSpi.java |  12 +-
 .../config/EnvPropertiesConfigProvider.java     |   2 +-
 .../config/SystemPropertiesConfigProvider.java  |   2 +-
 .../internal/el/DefaultExpressionEvaluator.java |   7 +-
 ...DependentApplicationEnvironmentProvider.java |   6 +-
 ...ssLoaderDependentEarEnvironmentProvider.java |   6 +-
 .../internal/env/SingleEnvironmentManager.java  |   4 +-
 .../SystemClassLoaderEnvironmentProvider.java   |   4 +-
 .../DefaultConfigFormatsSingletonSpi.java       |   8 +-
 .../resources/DefaultPathResourceLoader.java    |   6 +-
 .../internal/resources/io/AbstractResource.java |   2 +-
 .../core/internal/resources/io/ClassUtils.java  |   2 +-
 .../AbstractClasspathAwarePropertySource.java   |   4 +-
 .../properties/IntersectingPropertySource.java  |   3 +-
 .../properties/PathBasedPropertySource.java     |   7 +-
 .../core/properties/PropertySourceBuilder.java  |   8 +-
 .../core/spi/ConfigurationProviderSpi.java      |   2 +-
 .../tamaya/core/spi/EnvironmentProvider.java    |   2 +-
 .../java/org/apache/tamaya/JavaOneDemo.java     |   8 +-
 .../properties/PropertySourceBuilderTest.java   |   4 +-
 .../internal/MutableTestConfigProvider.java     |   2 +-
 .../tamaya/internal/TestConfigProvider.java     |   4 +-
 .../simple/SimplePropertiesAndCLISample.java    |   7 +-
 .../apache/tamaya/ucs/UC1ReadProperties.java    |  32 +--
 .../apache/tamaya/ucs/UC2CombineProperties.java |  18 +-
 docs/design/2_CoreConcepts.adoc                 | 206 ++++++++++---------
 .../integration/cdi/TestConfigProvider.java     |   2 +-
 48 files changed, 721 insertions(+), 684 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/ConfigChangeSetBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/ConfigChangeSetBuilder.java b/api/src/main/java/org/apache/tamaya/ConfigChangeSetBuilder.java
index 55ea27c..f9ba38a 100644
--- a/api/src/main/java/org/apache/tamaya/ConfigChangeSetBuilder.java
+++ b/api/src/main/java/org/apache/tamaya/ConfigChangeSetBuilder.java
@@ -299,7 +299,6 @@ public final class ConfigChangeSetBuilder {
      */
     public static Collection<PropertyChangeEvent> compare(PropertySource map1, PropertySource map2) {
         List<PropertyChangeEvent> changes = new ArrayList<>();
-
         for (Map.Entry<String, String> en : map1.toMap().entrySet()) {
             Optional<String> val = map2.get(en.getKey());
             if(!val.isPresent()) {
@@ -309,7 +308,6 @@ public final class ConfigChangeSetBuilder {
                 changes.add(new PropertyChangeEvent(map1, en.getKey(), val.get(), en.getValue()));
             }
         }
-
         for (Map.Entry<String, String> en : map2.toMap().entrySet()) {
             Optional<String> val = map1.get(en.getKey());
             if(!val.isPresent()) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/Configuration.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/Configuration.java b/api/src/main/java/org/apache/tamaya/Configuration.java
index 70fab89..2cdd195 100644
--- a/api/src/main/java/org/apache/tamaya/Configuration.java
+++ b/api/src/main/java/org/apache/tamaya/Configuration.java
@@ -156,7 +156,9 @@ public interface Configuration extends PropertySource {
     }
 
     /**
-     * Return a set with all fully qualifies area names.
+     * Return a set with all fully qualifies area names. This method should return the areas as accurate as possible,
+     * but may not provide a complete set of areas that are finally accessible, especially when the underlying storage
+     * does not support key iteration.
      *
      * @return s set with all areas, never {@code null}.
      */
@@ -176,7 +178,9 @@ public interface Configuration extends PropertySource {
 
     /**
      * Return a set with all fully qualified area names, containing the transitive closure also including all
-     * subarea names, regardless if properties are accessible or not.
+     * subarea names, regardless if properties are accessible or not. This method should return the areas as accurate
+     * as possible, but may not provide a complete set of areas that are finally accessible, especially when the
+     * underlying storage does not support key iteration.
      *
      * @return s set with all transitive areas, never {@code null}.
      */
@@ -199,7 +203,9 @@ public interface Configuration extends PropertySource {
 
     /**
      * Return a set with all fully qualified area names, containing only the
-     * areas that match the predicate and have properties attached
+     * areas that match the predicate and have properties attached. This method should return the areas as accurate as possible,
+     * but may not provide a complete set of areas that are finally accessible, especially when the underlying storage
+     * does not support key iteration.
      *
      * @param predicate A predicate to deternine, which areas should be returned, not {@code null}.
      * @return s set with all areas, never {@code null}.
@@ -210,7 +216,9 @@ public interface Configuration extends PropertySource {
 
     /**
      * Return a set with all fully qualified area names, containing the transitive closure also including all
-     * subarea names, regardless if properties are accessible or not.
+     * subarea names, regardless if properties are accessible or not. This method should return the areas as accurate as possible,
+     * but may not provide a complete set of areas that are finally accessible, especially when the underlying storage
+     * does not support key iteration.
      *
      * @param predicate A predicate to deternine, which areas should be returned, not {@code null}.
      * @return s set with all transitive areas, never {@code null}.
@@ -220,7 +228,8 @@ public interface Configuration extends PropertySource {
     }
 
     /**
-     * Allows to evaluate if an area exists.
+     * Allows to evaluate if an area exists. In case where the underlying storage implementation does not allow
+     * querying the keys available, {@code false} should be returned.
      *
      * @param areaKey the configuration area (sub)path.
      * @return {@code true}, if such a node exists.
@@ -350,16 +359,16 @@ public interface Configuration extends PropertySource {
     }
 
     /**
-     * Add a ConfigChangeListener to this configuration instance.
+     * Add a ConfigChangeListener to the given PropertySource instance.
      * @param predicate the event filtering predicate
      * @param l the listener, not null.
      */
-    public static  void addChangeListener(Predicate<PropertySource> predicate, Consumer<ConfigChangeSet> l){
+    public static void addChangeListener(Predicate<PropertySource> predicate, Consumer<ConfigChangeSet> l){
         ConfigurationManager.addChangeListener(predicate, l);
     }
 
     /**
-     * Removes a ConfigChangeListener to this configuration instance.
+     * Removes a ConfigChangeListener from the given PropertySource instance.
      * @param predicate the event filtering predicate
      * @param l the listener, not null.
      */
@@ -368,7 +377,7 @@ public interface Configuration extends PropertySource {
     }
 
     /**
-     * Method to publish changes on a {@link org.apache.tamaya.Configuration} to all interested parties.
+     * Method to publish changes on a {@link org.apache.tamaya.PropertySource} to all interested parties.
      * Basically this method gives an abstraction on the effective event bus design fo listeners. In a CDI context
      * the CDI enterprise event bus should be used internally to do the work, whereas in a SE only environment
      * a more puristic approach would be useful.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/ConfigurationManager.java b/api/src/main/java/org/apache/tamaya/ConfigurationManager.java
index 9fc3fdc..9915d64 100644
--- a/api/src/main/java/org/apache/tamaya/ConfigurationManager.java
+++ b/api/src/main/java/org/apache/tamaya/ConfigurationManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.tamaya;
 
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.spi.ConfigurationManagerSingletonSpi;
 
 import java.util.*;
@@ -30,10 +30,6 @@ import java.util.function.Predicate;
  * proxied configuration templates.
  */
 final class ConfigurationManager{
-    /**
-     * The backing SPI instance.
-     */
-    private static final ConfigurationManagerSingletonSpi configManagerSingletonSpi = loadConfigServiceSingletonSpi();
 
     /**
      * Private singleton constructor.
@@ -42,25 +38,13 @@ final class ConfigurationManager{
     }
 
     /**
-     * Method to initially load the singleton SPI fromMap the {@link org.apache.tamaya.spi.Bootstrap} mechanism.
-     * The instance loaded will be used until the VM is shutdown. In case use cases require more flexibility
-     * it should be transparently implemented in the SPI implementation. This singleton will simply delegate calls
-     * and not cache any responses.
-     *
-     * @return the SPI, never null.
-     */
-    private static ConfigurationManagerSingletonSpi loadConfigServiceSingletonSpi(){
-        return Bootstrap.getService(ConfigurationManagerSingletonSpi.class);
-    }
-
-    /**
      * Allows to check if a configuration with a given name is defined.
      *
      * @param name the configuration's name, not null, not empty.
      * @return true, if such a configuration is defined.
      */
     public static boolean isConfigurationDefined(String name){
-        return Optional.of(configManagerSingletonSpi).get().isConfigurationDefined(name);
+        return ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).isConfigurationDefined(name);
     }
 
     /**
@@ -73,7 +57,7 @@ final class ConfigurationManager{
      * @throws ConfigException if no such configuration is defined.
      */
     public static <T> T getConfiguration(String name, Class<T> template){
-        return Optional.of(configManagerSingletonSpi).get().getConfiguration(name, template);
+        return ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).getConfiguration(name, template);
     }
 
 
@@ -85,7 +69,7 @@ final class ConfigurationManager{
      * @throws ConfigException if no such configuration is defined.
      */
     public static Configuration getConfiguration(String name){
-        return Optional.of(configManagerSingletonSpi).get().getConfiguration(name);
+        return ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).getConfiguration(name);
     }
 
     /**
@@ -95,7 +79,7 @@ final class ConfigurationManager{
      * @throws ConfigException if no such configuration is defined.
      */
     public static Configuration getConfiguration(){
-        return Optional.of(configManagerSingletonSpi).get().getConfiguration();
+        return ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).getConfiguration();
     }
 
     /**
@@ -107,7 +91,7 @@ final class ConfigurationManager{
      * @throws ConfigException if the configuration could not be resolved.
      */
     public static <T> T getConfiguration(Class<T> type){
-        return Optional.of(configManagerSingletonSpi).get().getConfiguration(type);
+        return ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).getConfiguration(type);
     }
 
     /**
@@ -119,7 +103,7 @@ final class ConfigurationManager{
      * @throws ConfigException if the configuration could not be resolved.
      */
     public static void configure(Object instance){
-        Optional.of(configManagerSingletonSpi).get().configure(instance);
+        ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).configure(instance);
     }
 
     /**
@@ -140,7 +124,7 @@ final class ConfigurationManager{
      * @return the evaluated config expression.
      */
     public static String evaluateValue(Configuration config, String expression){
-        return Optional.of(configManagerSingletonSpi).get().evaluateValue(config, expression);
+        return ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).evaluateValue(config, expression);
     }
 
     /**
@@ -149,7 +133,7 @@ final class ConfigurationManager{
      * @param l the listener, not null.
      */
     public static void addChangeListener(Predicate<PropertySource> predicate, Consumer<ConfigChangeSet> l) {
-        Optional.of(configManagerSingletonSpi).get().addChangeListener(predicate, Objects.requireNonNull(l));
+        ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).addChangeListener(predicate, Objects.requireNonNull(l));
     }
 
     /**
@@ -158,7 +142,7 @@ final class ConfigurationManager{
      * @param l the listener, not null.
      */
     public static void removeChangeListener(Predicate<PropertySource> predicate, Consumer<ConfigChangeSet> l) {
-        Optional.of(configManagerSingletonSpi).get().removeChangeListener(predicate, Objects.requireNonNull(l));
+        ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).removeChangeListener(predicate, Objects.requireNonNull(l));
     }
 
     /**
@@ -169,6 +153,6 @@ final class ConfigurationManager{
      * @param configChange the change to be published, not null.
      */
     public static void publishChange(ConfigChangeSet configChange) {
-        Optional.of(configManagerSingletonSpi).get().publishChange(Objects.requireNonNull(configChange));
+        ServiceContext.getInstance().getSingleton(ConfigurationManagerSingletonSpi.class).publishChange(Objects.requireNonNull(configChange));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/EnvironmentManager.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/EnvironmentManager.java b/api/src/main/java/org/apache/tamaya/EnvironmentManager.java
index a6ae5cd..164e456 100644
--- a/api/src/main/java/org/apache/tamaya/EnvironmentManager.java
+++ b/api/src/main/java/org/apache/tamaya/EnvironmentManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.tamaya;
 
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.spi.EnvironmentManagerSingletonSpi;
 
 import java.util.List;
@@ -31,30 +31,18 @@ import java.util.Set;
  */
 final class EnvironmentManager{
 
-    private static final EnvironmentManagerSingletonSpi environmentManagerSingletonSpi = loadContextProviderSpi();
-
     /**
      * Private singleton constructor.
      */
     private EnvironmentManager(){}
 
     /**
-     * Method to load the environment SPI during initial load.
-     * @return the EnvironmentProviderSpi SPI, never null.
-     */
-    private static EnvironmentManagerSingletonSpi loadContextProviderSpi(){
-        return Bootstrap.getService(EnvironmentManagerSingletonSpi.class);
-    }
-
-    /**
      * Get the current {@link Environment}. The environment is used to determine the current runtime state, which
      * is important for returning the correct configuration.
      * @return the current Environment, never null.
      */
     public static Environment getEnvironment(){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getEnvironment();
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getEnvironment();
     }
 
     /**
@@ -62,9 +50,7 @@ final class EnvironmentManager{
      * @return the current root Environment, never null.
      */
     public static Environment getRootEnvironment(){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getRootEnvironment();
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getRootEnvironment();
     }
 
     /**
@@ -72,9 +58,7 @@ final class EnvironmentManager{
      * @return the hierarchy chain current possible Environments.
      */
     public static List<String> getEnvironmentTypeOrder(){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getEnvironmentTypeOrder();
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getEnvironmentTypeOrder();
     }
 
     /**
@@ -82,9 +66,7 @@ final class EnvironmentManager{
      * @return the current type chain current Environments.
      */
     public static List<String> getEnvironmentHierarchy(){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getEnvironmentHierarchy();
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getEnvironmentHierarchy();
     }
 
     /**
@@ -94,9 +76,7 @@ final class EnvironmentManager{
      * @throws IllegalArgumentException if not such type is present or active.
      */
     public static Optional<Environment> getEnvironment(String environmentType){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getEnvironment(environmentType);
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getEnvironment(environmentType);
     }
 
     /**
@@ -106,9 +86,7 @@ final class EnvironmentManager{
      * @return the corresponding environment, if available.
      */
     public static Optional<Environment> getEnvironment(String environmentType, String contextId){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getEnvironment(environmentType, contextId);
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getEnvironment(environmentType, contextId);
     }
 
     /**
@@ -117,9 +95,7 @@ final class EnvironmentManager{
      * @return the corresponding environment contexts known, never null.
      */
     public static Set<String> getEnvironmentContexts(String environmentType){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).getEnvironmentContexts(environmentType);
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).getEnvironmentContexts(environmentType);
     }
 
     /**
@@ -128,9 +104,7 @@ final class EnvironmentManager{
      * @return true, if the czurrent environment type is one current the current active environment types.
      */
     public static boolean isEnvironmentActive(String environmentType){
-        return Optional.ofNullable(environmentManagerSingletonSpi).orElseThrow(
-                () -> new IllegalStateException("No SPI loaded.")
-        ).isEnvironmentActive(environmentType);
+        return ServiceContext.getInstance().getSingleton(EnvironmentManagerSingletonSpi.class).isEnvironmentActive(environmentType);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/PropertyAdapters.java b/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
index 59dc3b1..cde5934 100644
--- a/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
+++ b/api/src/main/java/org/apache/tamaya/PropertyAdapters.java
@@ -19,25 +19,14 @@
 package org.apache.tamaya;
 
 import org.apache.tamaya.annotation.WithPropertyAdapter;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.spi.PropertyAdaptersSingletonSpi;
-import java.util.Optional;
 
 /**
  * Singleton manager that provides {@link PropertyAdapter} instance, usable for converting String
  * based configuration entries into any other target types.
  */
 public final class PropertyAdapters{
-    /** The SPI finally registered backing this singleton. */
-    private static final PropertyAdaptersSingletonSpi propertyAdaptersSingletonSpi = loadConfigAdapterProviderSpi();
-
-    /**
-     * Method that loads the singleton backing bean fromMap the {@link org.apache.tamaya.spi.Bootstrap} component.
-     * @return the PropertyAdaptersSingletonSpi, never null.
-     */
-    private static PropertyAdaptersSingletonSpi loadConfigAdapterProviderSpi(){
-        return Bootstrap.getService(PropertyAdaptersSingletonSpi.class);
-    }
 
     /**
      * Orivate singleton constructor.
@@ -53,7 +42,7 @@ public final class PropertyAdapters{
      * @return any adapter replaced with the new adapter, or null.
      */
     public static <T> PropertyAdapter<T> register(Class<T> targetType, PropertyAdapter<T> adapter){
-        return Optional.of(propertyAdaptersSingletonSpi).get().register(targetType, adapter);
+        return ServiceContext.getInstance().getSingleton(PropertyAdaptersSingletonSpi.class).register(targetType, adapter);
     }
 
     /**
@@ -62,7 +51,7 @@ public final class PropertyAdapters{
      * @return true, if the given target type is supported.
      */
     public static boolean isTargetTypeSupported(Class<?> targetType){
-        return Optional.of(propertyAdaptersSingletonSpi).get().isTargetTypeSupported(targetType);
+        return ServiceContext.getInstance().getSingleton(PropertyAdaptersSingletonSpi.class).isTargetTypeSupported(targetType);
     }
 
     /**
@@ -87,7 +76,7 @@ public final class PropertyAdapters{
      * instantiated.
      */
     public static  <T> PropertyAdapter<T> getAdapter(Class<T> targetType, WithPropertyAdapter annotation){
-        return Optional.of(propertyAdaptersSingletonSpi).get().getAdapter(targetType, annotation);
+        return ServiceContext.getInstance().getSingleton(PropertyAdaptersSingletonSpi.class).getAdapter(targetType, annotation);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/PropertySource.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/PropertySource.java b/api/src/main/java/org/apache/tamaya/PropertySource.java
index 22d332c..f44d561 100644
--- a/api/src/main/java/org/apache/tamaya/PropertySource.java
+++ b/api/src/main/java/org/apache/tamaya/PropertySource.java
@@ -24,31 +24,29 @@ import java.util.Optional;
 import java.util.Set;
 
 /**
-* This interface models a provider that serves configuration properties. The contained
-* properties may be read fromMap single or several sources (composite).<br/>
-* Property config are the building blocks out current which complex
-* configuration is setup.
-* <p/>
-* <h3>Implementation Requirements</h3>
-* <p></p>Implementations current this interface must be
-* <ul>
-* <li>Thread safe.
-* </ul>
-* It is highly recommended that implementations also are
-* <ul>
-* <li>Immutable</li>
-* <li>serializable</li>
-* </ul>
-* </p>
-*/
+ * This interface models a provider that serves configuration properties. The contained
+ * properties may be read fromMap single or several sources (composite).<br/>
+ * Property config are the building blocks out current which complex
+ * configuration is setup.
+ * <p/>
+ * <h3>Implementation Requirements</h3>
+ * <p></p>Implementations current this interface must be
+ * <ul>
+ * <li>Thread safe.
+ * </ul>
+ * It is highly recommended that implementations also are
+ * <ul>
+ * <li>Immutable</li>
+ * <li>serializable</li>
+ * </ul>
+ * </p>
+ */
 public interface PropertySource {
 
     /**
-     * Access an empty and immutable PropertyProvider instance.
-     *
-     * @return an empty and immutable PropertyProvider instance, never null.
+     * An empty and immutable PropertyProvider instance.
      */
-    public static final PropertySource EMPTY_PROPERTYSOURCE = new PropertySource(){
+    public static final PropertySource EMPTY_PROPERTYSOURCE = new PropertySource() {
 
         private MetaInfo metaInfo = MetaInfo.of("<empty>");
 
@@ -75,90 +73,90 @@ public interface PropertySource {
 
     /**
      * Access a property.
+     *
      * @param key the property's key, not null.
      * @return the property's value.
      */
     Optional<String> get(String key);
 
     /**
-     * Checks if a property is defined.
-     * @param key the property's key, not null.
-     * @return true, if the property is existing.
-     */
-    boolean containsKey(String key);
-
-    /**
-     * Access the current properties as Map.
-     * @return the a corresponding map, never null.
-     */
-    Map<String, String> toMap();
-
-    /**
      * Get the meta-info current a configuration.
+     *
      * @return the configuration's/config map's metaInfo, or null.
      */
     MetaInfo getMetaInfo();
 
     /**
-     * Compares the given property provider for same
-     * contents, regardless current its current state or runtime implementation.
-     * @param provider the provider to be compared, not null.
-     * @return true, if both property sets equals.
+     * Checks if a property is defined/accessible.
+     * @throws java.lang.UnsupportedOperationException If the underlying storage does not support introspection.
+     * @param key the property's key, not null.
+     * @return true, if the property is existing.
      */
-    default boolean hasSameProperties(PropertySource provider) {
-        return this == provider || ConfigChangeSetBuilder.compare(this, provider).isEmpty();
+    boolean containsKey(String key);
+
+    /**
+     * Allows to quickly check, if a provider is empty.
+     * @return true, if the provier is empty.
+     */
+    default boolean isEmpty(){
+        return keySet().isEmpty();
     }
 
     /**
-     * Access the set current property keys, defined by this provider.
+     * Access the set current property keys, defined by this provider. The resulting Set may not return all keys
+     * accessible, e.g. when the underlying storage does not support iteration of its entries.
+     *
      * @return the key set, never null.
      */
-    default Set<String> keySet(){
+    default Set<String> keySet() {
         return toMap().keySet();
     }
 
     /**
+     * Access the current properties as Map. The resulting Map may not return all items accessible, e.g.
+     * when the underlying storage does not support iteration of its entries.
+     * @return the a corresponding map, never null.
+     */
+    Map<String, String> toMap();
+
+
+    /**
      * Reloads the {@link PropertySource}.
      */
-    default ConfigChangeSet load(){
+    default ConfigChangeSet load() {
         // by default do nothing
         return ConfigChangeSet.emptyChangeSet(this);
     }
 
     /**
      * Allows to evaluate if the provider is mutable.
+     *
      * @return true, if the provider is mutable.
      * @see #apply(ConfigChangeSet)
      */
-    default boolean isMutable(){
+    default boolean isMutable() {
         return false;
     }
 
     /**
      * Apply a config change to this item. Hereby the change must be related to the same instance.
+     *
      * @param change the config change
-     * @throws ConfigException if an unrelated change was passed.
+     * @throws ConfigException               if an unrelated change was passed.
      * @throws UnsupportedOperationException when the configuration is not writable.
      * @see #isMutable()
      */
-    default void apply(ConfigChangeSet change){
-        throw new UnsupportedOperationException("Config/properties not mutable: "+ this);
-    }
-
-    /**
-     * Allows to quickly check, if a provider is empty.
-     * @return true, if the provier is empty.
-     */
-    default boolean isEmpty(){
-        return keySet().isEmpty();
+    default void apply(ConfigChangeSet change) {
+        throw new UnsupportedOperationException("Config/properties not mutable: " + this);
     }
 
     /**
      * Convert the this PropertyProvider instance to a {@link org.apache.tamaya.Configuration}.
+     *
      * @return the configuration, never null.
      */
-    default Configuration toConfiguration(){
-        return new Configuration(){
+    default Configuration toConfiguration() {
+        return new Configuration() {
             @Override
             public Optional<String> get(String key) {
                 return PropertySource.this.get(key);
@@ -177,7 +175,7 @@ public interface PropertySource {
             }
             @Override
             public String toString() {
-                return "Configuration [source: PropertyProvider "+getMetaInfo()+"]";
+                return "Configuration [source: PropertySource "+getMetaInfo()+"]";
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/Bootstrap.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/Bootstrap.java b/api/src/main/java/org/apache/tamaya/spi/Bootstrap.java
deleted file mode 100644
index 891e680..0000000
--- a/api/src/main/java/org/apache/tamaya/spi/Bootstrap.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.spi;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Objects;
-import java.util.ServiceLoader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This singleton provides access to the services available in the current runtime environment and context. The
- * behaviour can be adapted, by calling {@link org.apache.tamaya.spi.Bootstrap#init(ServiceProvider)} before accessing any moneteray
- * services.
- */
-public final class Bootstrap{
-    /**
-     * The ServiceProvider used.
-     */
-    private static volatile ServiceProvider serviceProviderDelegate;
-    /**
-     * The shared lock instance user.
-     */
-    private static final Object LOCK = new Object();
-
-    /**
-     * Private singletons constructor.
-     */
-    private Bootstrap(){
-    }
-
-    /**
-     * Load the {@link ServiceProvider} to be used.
-     *
-     * @return {@link ServiceProvider} to be used for loading the services.
-     */
-    private static ServiceProvider loadDefaultServiceProvider(){
-        try{
-
-            for(ServiceProvider sp : ServiceLoader.load(ServiceProvider.class)){
-                return sp;
-            }
-        }
-        catch(Exception e){
-            Logger.getLogger(Bootstrap.class.getName()).log(Level.INFO, "No ServiceProvider loaded, using default.");
-        }
-        return new DefaultServiceProvider();
-    }
-
-    /**
-     * Replace the current {@link ServiceProvider} in use.
-     *
-     * @param serviceProvider the new {@link ServiceProvider}
-     */
-    public static void init(ServiceProvider serviceProvider){
-        Objects.requireNonNull(serviceProvider);
-        synchronized(LOCK){
-            if (Bootstrap.serviceProviderDelegate==null) {
-                Bootstrap.serviceProviderDelegate = serviceProvider;
-                Logger.getLogger(Bootstrap.class.getName())
-                        .log(Level.INFO, "Money Bootstrap: new ServiceProvider set: " + serviceProvider.getClass().getName());
-            } else {
-                throw new IllegalStateException("Services are already initialized.");
-            }
-        }
-    }
-
-    /**
-     * Ge {@link ServiceProvider}. If necessary the {@link ServiceProvider} will be laziliy loaded.
-     *
-     * @return the {@link ServiceProvider} used.
-     */
-    static ServiceProvider getServiceProvider(){
-        if (serviceProviderDelegate==null) {
-            synchronized(LOCK){
-                if (serviceProviderDelegate==null) {
-                    serviceProviderDelegate = loadDefaultServiceProvider();
-                }
-            }
-        }
-        return serviceProviderDelegate;
-    }
-
-    /**
-     * Delegate method for {@link ServiceProvider#getServices(Class)}.
-     *
-     * @param serviceType the service type.
-     * @return the services found.
-     * @see ServiceProvider#getServices(Class)
-     */
-    public static <T> Collection<T> getServices(Class<T> serviceType){
-        return getServiceProvider().getServices(serviceType);
-    }
-
-    /**
-     * Delegate method for {@link ServiceProvider#getServices(Class)}.
-     *
-     * @param serviceType     the service type.
-     * @param defaultServices the default service list.
-     * @return the services found.
-     * @see ServiceProvider#getServices(Class, java.util.List)
-     */
-    public static <T> List<T> getServices(Class<T> serviceType, List<T> defaultServices){
-        return getServiceProvider().getServices(serviceType, defaultServices);
-    }
-
-    /**
-     * Delegate method for {@link ServiceProvider#getServices(Class)}.
-     *
-     * @param serviceType the service type.
-     * @return the service found, never {@code null}.
-     * @see ServiceProvider#getServices(Class)
-     */
-    public static <T> T getService(Class<T> serviceType){
-        List<T> services = getServiceProvider().getServices(serviceType);
-        if(services.isEmpty()){
-            throw new IllegalStateException("No such service found: " + serviceType);
-        }
-        return services.get(0);
-    }
-
-    /**
-     * Delegate method for {@link ServiceProvider#getServices(Class)}.
-     *
-     * @param serviceType    the service type.
-     * @param defaultService returned if no service was found.
-     * @return the service found, only {@code null}, if no service was found and
-     * {@code defaultService==null}.
-     * @see ServiceProvider#getServices(Class, java.util.List)
-     */
-    public static <T> T getService(Class<T> serviceType, T defaultService){
-        List<T> services = getServiceProvider().getServices(serviceType);
-        if(services.isEmpty()){
-            return defaultService;
-        }
-        return services.get(0);
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/ConfigurationManagerSingletonSpi.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/ConfigurationManagerSingletonSpi.java b/api/src/main/java/org/apache/tamaya/spi/ConfigurationManagerSingletonSpi.java
index 86b52a4..46f9a10 100644
--- a/api/src/main/java/org/apache/tamaya/spi/ConfigurationManagerSingletonSpi.java
+++ b/api/src/main/java/org/apache/tamaya/spi/ConfigurationManagerSingletonSpi.java
@@ -27,12 +27,12 @@ import java.util.function.Predicate;
 
 /**
  * Manager for {@link org.apache.tamaya.Configuration} instances. Implementations must register an instance
- * using the {@link Bootstrap} mechanism in place (by default this is based on the {@link java.util.ServiceLoader}.
+ * using the {@link ServiceContextManager} mechanism in place (by default this is based on the {@link java.util.ServiceLoader}.
  * The {@link org.apache.tamaya.ConfigurationManager} Singleton in the API delegates its corresponding calls to the
  * instance returned by the current bootstrap service in place.
  *
  * @see org.apache.tamaya.ConfigurationManager
- * @see Bootstrap
+ * @see ServiceContextManager
  */
 public interface ConfigurationManagerSingletonSpi{
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/DefaultServiceComparator.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/DefaultServiceComparator.java b/api/src/main/java/org/apache/tamaya/spi/DefaultServiceComparator.java
new file mode 100644
index 0000000..c53a52d
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/spi/DefaultServiceComparator.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.spi;
+
+import java.util.*;
+
+/**
+ * Simple comparator based on a Collection of {@link org.apache.tamaya.spi.OrdinalProvider} instances.
+ */
+final class DefaultServiceComparator implements Comparator<Object>{
+
+    /**
+     * List of ordinal providers loaded.
+     */
+    private List<OrdinalProvider> ordinalProviders = new ArrayList<>();
+
+    DefaultServiceComparator(Collection<? extends OrdinalProvider> providers){
+        ordinalProviders.addAll(Objects.requireNonNull(providers));
+        ordinalProviders.sort(this::compare);
+    }
+
+    private int compare(OrdinalProvider provider1, OrdinalProvider provider2){
+        int o1 = getOrdinal(provider1);
+        int o2 = getOrdinal(provider2);
+        int order = o1-o2;
+        if(order < 0){
+            return -1;
+        }
+        else if(order > 0){
+            return 1;
+        }
+        return 0;
+    }
+
+    private int getOrdinal(OrdinalProvider provider){
+        if(provider instanceof Orderable){
+            return ((Orderable)provider).order();
+        }
+        return 0;
+    }
+
+    public int getOrdinal(Object service){
+        for(OrdinalProvider provider: ordinalProviders){
+            OptionalInt ord = provider.getOrdinal(service.getClass());
+            if(ord.isPresent()){
+                return ord.getAsInt();
+            }
+        }
+        if(service instanceof Orderable){
+            return ((Orderable)service).order();
+        }
+        return 0;
+    }
+
+
+    @Override
+    public int compare(Object o1, Object o2) {
+        int ord1 = getOrdinal(o1);
+        int ord2 = getOrdinal(o2);
+        int order = ord1-ord2;
+        if(order < 0){
+            return -1;
+        }
+        else if(order > 0){
+            return 1;
+        }
+        return 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/DefaultServiceContextProvider.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/DefaultServiceContextProvider.java b/api/src/main/java/org/apache/tamaya/spi/DefaultServiceContextProvider.java
new file mode 100644
index 0000000..8ac1cd6
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/spi/DefaultServiceContextProvider.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.spi;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * This class implements the (default) {@link ServiceContext} interface and hereby uses the JDK
+ * {@link java.util.ServiceLoader} to load the services required.
+ */
+class DefaultServiceContextProvider implements ServiceContext {
+    /** List current services loaded, per class. */
+    private final ConcurrentHashMap<Class, List<Object>> servicesLoaded = new ConcurrentHashMap<>();
+    /** Singletons. */
+    private final ConcurrentHashMap<Class, Optional<?>> singletons = new ConcurrentHashMap<>();
+    /** Comparator for ordering of multiple services found. */
+    private DefaultServiceComparator serviceComparator;
+
+    public DefaultServiceContextProvider(){
+        serviceComparator = new DefaultServiceComparator(getServices(OrdinalProvider.class, Collections.emptyList()));
+    }
+
+    @Override
+    public <T> Optional<T> getService(Class<T> serviceType) {
+        Optional<T> cached = (Optional<T>)singletons.get(serviceType);
+        if(cached==null) {
+            List<? extends T> services = getServices(serviceType, Collections.emptyList());
+            if (services.isEmpty()) {
+                cached = Optional.empty();
+            }
+            else{
+                cached = Optional.of(services.get(0));
+            }
+            singletons.put(serviceType, cached);
+        }
+        return cached;
+    }
+
+    /**
+     * Loads and registers services.
+     *
+     * @param serviceType
+     *            The service type.
+     * @param <T>
+     *            the concrete type.
+     * @param defaultList
+     *            the list current items returned, if no services were found.
+     * @return the items found, never {@code null}.
+     */
+    @Override
+    public <T> List<? extends T> getServices(final Class<T> serviceType, final List<? extends T> defaultList) {
+        @SuppressWarnings("unchecked")
+        List<T> found = (List<T>) servicesLoaded.get(serviceType);
+        if (found != null) {
+            return found;
+        }
+        return loadServices(serviceType, defaultList);
+    }
+
+    /**
+     * Loads and registers services.
+     *
+     * @param   serviceType  The service type.
+     * @param   <T>          the concrete type.
+     * @param   defaultList  the list current items returned, if no services were found.
+     *
+     * @return  the items found, never {@code null}.
+     */
+    private <T> List<? extends T> loadServices(final Class<T> serviceType, final List<? extends T> defaultList) {
+        try {
+            List<T> services = new ArrayList<>();
+            for (T t : ServiceLoader.load(serviceType)) {
+                services.add(t);
+            }
+            if(services.isEmpty()){
+                services.addAll(defaultList);
+            }
+            if(!serviceType.equals(OrdinalProvider.class)) {
+                services.sort(serviceComparator);
+            }
+            services = Collections.unmodifiableList(services);
+            final List<T> previousServices = (List<T>) servicesLoaded.putIfAbsent(serviceType, (List<Object>)services);
+            return previousServices != null ? previousServices : services;
+        } catch (Exception e) {
+            Logger.getLogger(DefaultServiceContextProvider.class.getName()).log(Level.WARNING,
+                                                                         "Error loading services current type " + serviceType, e);
+            return defaultList;
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/DefaultServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/DefaultServiceProvider.java b/api/src/main/java/org/apache/tamaya/spi/DefaultServiceProvider.java
deleted file mode 100644
index 9f24b38..0000000
--- a/api/src/main/java/org/apache/tamaya/spi/DefaultServiceProvider.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.spi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.ServiceLoader;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class implements the (default) {@link ServiceProvider} interface and hereby uses the JDK
- * {@link java.util.ServiceLoader} to load the services required.
- */
-class DefaultServiceProvider implements ServiceProvider {
-    /** List current services loaded, per class. */
-    private final ConcurrentHashMap<Class, List<Object>> servicesLoaded = new ConcurrentHashMap<>();
-
-    /**
-     * Loads and registers services.
-     *
-     * @param serviceType
-     *            The service type.
-     * @param <T>
-     *            the concrete type.
-     * @param defaultList
-     *            the list current items returned, if no services were found.
-     * @return the items found, never {@code null}.
-     */
-    @Override
-    public <T> List<T> getServices(final Class<T> serviceType, final List<T> defaultList) {
-        @SuppressWarnings("unchecked")
-        List<T> found = (List<T>) servicesLoaded.get(serviceType);
-        if (found != null) {
-            return found;
-        }
-
-        return loadServices(serviceType, defaultList);
-    }
-
-    /**
-     * Loads and registers services.
-     *
-     * @param   serviceType  The service type.
-     * @param   <T>          the concrete type.
-     * @param   defaultList  the list current items returned, if no services were found.
-     *
-     * @return  the items found, never {@code null}.
-     */
-    private <T> List<T> loadServices(final Class<T> serviceType, final List<T> defaultList) {
-        try {
-            List<T> services = new ArrayList<>();
-            for (T t : ServiceLoader.load(serviceType)) {
-                services.add(t);
-            }
-            if(services.isEmpty()){
-                services.addAll(defaultList);
-            }
-            @SuppressWarnings("unchecked")
-            final List<T> previousServices = (List<T>) servicesLoaded.putIfAbsent(serviceType, (List<Object>) services);
-            return Collections.unmodifiableList(previousServices != null ? previousServices : services);
-        } catch (Exception e) {
-            Logger.getLogger(DefaultServiceProvider.class.getName()).log(Level.WARNING,
-                                                                         "Error loading services current type " + serviceType, e);
-            return defaultList;
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/Orderable.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/Orderable.java b/api/src/main/java/org/apache/tamaya/spi/Orderable.java
new file mode 100644
index 0000000..401d181
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/spi/Orderable.java
@@ -0,0 +1,9 @@
+package org.apache.tamaya.spi;
+
+/**
+ * Created by Anatole on 14.12.2014.
+ */
+@FunctionalInterface
+public interface Orderable {
+    int order();
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/OrdinalProvider.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/OrdinalProvider.java b/api/src/main/java/org/apache/tamaya/spi/OrdinalProvider.java
new file mode 100644
index 0000000..7d0c205
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/spi/OrdinalProvider.java
@@ -0,0 +1,19 @@
+package org.apache.tamaya.spi;
+
+import java.util.OptionalInt;
+
+/**
+ * The ordinal provider is an optional component that provides an abstraction for ordering/prioritizing
+ * services loaded. This can be used to determine, which SPI should be used, if multiple instances are
+ * available, or for ordering chain of services.
+ * @see ServiceContext
+ */
+public interface OrdinalProvider {
+    /**
+     * Evaluate the ordinal number for the given type.
+     * @param type the target type, not null.
+     * @return the ordinal, if not defined, 0 should be returned.
+     */
+     OptionalInt getOrdinal(Class<?> type);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java b/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
new file mode 100644
index 0000000..aeacade
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.spi;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * This class models the component that is managing the lifecycle current the
+ * services used by the Configuration API.
+ */
+public interface ServiceContext {
+
+    /**
+     * Delegate method for {@link ServiceContext#getService(Class)}.
+     *
+     * @param serviceType the service type.
+     * @return the service found, never {@code null}.
+     * @see ServiceContext#getService(Class)
+     */
+    default <T> T getSingleton(Class<T> serviceType) {
+        return getService(serviceType)
+                .orElseThrow(() -> new IllegalStateException("Singleton missing: " + serviceType.getName()));
+    }
+    /**
+     * Access a singleton, given its type.
+     *
+     * @param serviceType
+     *            the service type.
+     * @return The instance to be used, never {@code null}
+     */
+    <T> Optional<T> getService(Class<T> serviceType);
+
+	/**
+	 * Access a list current services, given its type. The bootstrap mechanism should
+	 * order the instance for precedence, hereby the most significant should be
+	 * first in order.
+	 * 
+	 * @param serviceType
+	 *            the service type.
+	 * @param defaultList
+	 *            the lis returned, if no services could be found.
+	 * @return The instance to be used, never {@code null}
+	 */
+    <T> List<? extends T> getServices(Class<T> serviceType, List<? extends T> defaultList);
+
+    /**
+     * Access a list current services, given its type. The bootstrap mechanism should
+     * order the instance for precedence, hereby the most significant should be
+     * first in order.
+     *
+     * @param serviceType
+     *            the service type.
+     * @return The instance to be used, never {@code null}
+     */
+    default <T> List<? extends T> getServices(Class<T> serviceType){
+        return getServices(serviceType, Collections.emptyList());
+    }
+
+    /**
+     * Get the current {@link ServiceContext}. If necessary the {@link ServiceContext} will be laziliy loaded.
+     *
+     * @return the {@link ServiceContext} to be used.
+     */
+    public static ServiceContext getInstance(){
+        return ServiceContextManager.getServiceContext();
+    }
+
+    /**
+     * Replace the current {@link ServiceContext} in use.
+     *
+     * @param serviceContext the new {@link ServiceContext}, not null.
+     */
+    public static ServiceContext set(ServiceContext serviceContext){
+        return ServiceContextManager.set(Objects.requireNonNull(serviceContext));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java b/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
new file mode 100644
index 0000000..63e4d70
--- /dev/null
+++ b/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.spi;
+
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * This singleton provides access to the services available in the current {@link ServiceContext}. The
+ * behaviour can be adapted, by calling {@link ServiceContextManager#set(ServiceContext)} before accessing any
+ * services.
+ */
+final class ServiceContextManager {
+    /**
+     * The ServiceProvider used.
+     */
+    private static volatile ServiceContext serviceContextProviderDelegate;
+    /**
+     * The shared lock instance user.
+     */
+    private static final Object LOCK = new Object();
+
+    /**
+     * Private singletons constructor.
+     */
+    private ServiceContextManager() {
+    }
+
+    /**
+     * Load the {@link ServiceContext} to be used.
+     *
+     * @return {@link ServiceContext} to be used for loading the services.
+     */
+    private static ServiceContext loadDefaultServiceProvider() {
+        try {
+            for (ServiceContext sp : ServiceLoader.load(ServiceContext.class)) {
+                return sp;
+            }
+        } catch (Exception e) {
+            Logger.getLogger(ServiceContextManager.class.getName()).log(Level.INFO, "Using default ServiceProvider.");
+        }
+        return new DefaultServiceContextProvider();
+    }
+
+    /**
+     * Replace the current {@link ServiceContext} in use.
+     *
+     * @param serviceContextProvider the new {@link ServiceContext}, not null.
+     */
+    public static ServiceContext set(ServiceContext serviceContextProvider) {
+        ServiceContext currentContext = ServiceContextManager.serviceContextProviderDelegate;
+        Objects.requireNonNull(serviceContextProvider);
+        synchronized (LOCK) {
+            if (ServiceContextManager.serviceContextProviderDelegate == null) {
+                ServiceContextManager.serviceContextProviderDelegate = serviceContextProvider;
+                Logger.getLogger(ServiceContextManager.class.getName())
+                        .log(Level.INFO, "Using ServiceProvider: " + serviceContextProvider.getClass().getName());
+            } else {
+                Logger.getLogger(ServiceContextManager.class.getName())
+                        .log(Level.WARNING, "Replacing ServiceProvider " + ServiceContextManager.serviceContextProviderDelegate.getClass().getName() + " with: " + serviceContextProvider.getClass().getName());
+                ServiceContextManager.serviceContextProviderDelegate = serviceContextProvider;
+            }
+        }
+        return currentContext;
+    }
+
+    /**
+     * Ge {@link ServiceContext}. If necessary the {@link ServiceContext} will be laziliy loaded.
+     *
+     * @return the {@link ServiceContext} used.
+     */
+    public static ServiceContext getServiceContext() {
+        if (serviceContextProviderDelegate == null) {
+            synchronized (LOCK) {
+                if (serviceContextProviderDelegate == null) {
+                    serviceContextProviderDelegate = loadDefaultServiceProvider();
+                }
+            }
+        }
+        return serviceContextProviderDelegate;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/api/src/main/java/org/apache/tamaya/spi/ServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/spi/ServiceProvider.java b/api/src/main/java/org/apache/tamaya/spi/ServiceProvider.java
deleted file mode 100644
index 2c5da59..0000000
--- a/api/src/main/java/org/apache/tamaya/spi/ServiceProvider.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.spi;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * This class models the component that is managing the lifecycle current the
- * services used by the Configuration API.
- */
-public interface ServiceProvider {
-
-	/**
-	 * Access a list current services, given its type. The bootstrap mechanism should
-	 * order the instance for precedence, hereby the most significant should be
-	 * first in order.
-	 * 
-	 * @param serviceType
-	 *            the service type.
-	 * @return The instance to be used, never {@code null}
-	 */
-	@SuppressWarnings("unchecked")
-    default <T> List<T> getServices(Class<T> serviceType){
-          return getServices(serviceType, Collections.emptyList());
-    }
-
-	/**
-	 * Access a list current services, given its type. The bootstrap mechanism should
-	 * order the instance for precedence, hereby the most significant should be
-	 * first in order.
-	 * 
-	 * @param serviceType
-	 *            the service type.
-	 * @param defaultList
-	 *            the lis returned, if no services could be found.
-	 * @return The instance to be used, never {@code null}
-	 */
-    <T> List<T> getServices(Class<T> serviceType, List<T> defaultList);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/config/AbstractConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/config/AbstractConfiguration.java b/core/src/main/java/org/apache/tamaya/core/config/AbstractConfiguration.java
index e0ab2fb..4a9c331 100644
--- a/core/src/main/java/org/apache/tamaya/core/config/AbstractConfiguration.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/AbstractConfiguration.java
@@ -21,7 +21,7 @@ package org.apache.tamaya.core.config;
 import org.apache.tamaya.*;
 import org.apache.tamaya.core.properties.AbstractPropertySource;
 import org.apache.tamaya.core.spi.AdapterProviderSpi;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 
 import java.util.*;
 import java.util.logging.Logger;
@@ -43,7 +43,7 @@ public abstract class AbstractConfiguration extends AbstractPropertySource imple
 
     @Override
     public <T> Optional<T> get(String key, Class<T> type){
-        AdapterProviderSpi as = Bootstrap.getService(AdapterProviderSpi.class);
+        AdapterProviderSpi as = ServiceContext.getInstance().getSingleton(AdapterProviderSpi.class);
         PropertyAdapter<T> adapter = as.getAdapter(type);
         if(adapter == null){
             throw new ConfigException(
@@ -70,19 +70,19 @@ public abstract class AbstractConfiguration extends AbstractPropertySource imple
     public ConfigChangeSet load(){
         Configuration oldState;
         Configuration newState;
+        ConfigChangeSet changeSet = null;
         synchronized(LOCK) {
             oldState = FreezedConfiguration.of(this);
             reload();
             newState = FreezedConfiguration.of(this);
-            if(oldState.hasSameProperties(newState)){
-                return ConfigChangeSet.emptyChangeSet(this);
-            }
-            this.version = UUID.randomUUID().toString();
+            changeSet = ConfigChangeSetBuilder.of(oldState).addChanges(newState).build();
         }
-        ConfigChangeSet changeSet = ConfigChangeSetBuilder.of(oldState).addChanges(newState).build();
+        if(changeSet.isEmpty()){
+            return ConfigChangeSet.emptyChangeSet(this);
+        }
+        this.version = UUID.randomUUID().toString();
         Configuration.publishChange(changeSet);
         return changeSet;
     }
 
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java b/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
index e28da5e..3075f8c 100644
--- a/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
@@ -64,7 +64,7 @@ public final class ConfigFunctions {
                             .collect(Collectors.toMap(
                                     e -> stripKeys ? e.getKey().substring(areaKey.length() + 1) : e.getKey(),
                                     e -> e.getValue())));
-            return PropertySourceBuilder.create("area: " + areaKey).addMap(area).build().toConfiguration();
+            return PropertySourceBuilder.of("area: " + areaKey).addMap(area).build().toConfiguration();
         };
     }
 
@@ -111,7 +111,7 @@ public final class ConfigFunctions {
                             .collect(Collectors.toMap(
                                     e -> stripKeys ? e.getKey().substring(areaKey.length() + 1) : e.getKey(),
                                     e -> e.getValue())));
-            return PropertySourceBuilder.create("area (recursive): " + areaKey).addMap(area).build().toConfiguration();
+            return PropertySourceBuilder.of("area (recursive): " + areaKey).addMap(area).build().toConfiguration();
         };
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/config/ConfigurationFormats.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/config/ConfigurationFormats.java b/core/src/main/java/org/apache/tamaya/core/config/ConfigurationFormats.java
index 4e6e772..26f053d 100644
--- a/core/src/main/java/org/apache/tamaya/core/config/ConfigurationFormats.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/ConfigurationFormats.java
@@ -18,16 +18,13 @@
  */
 package org.apache.tamaya.core.config;
 
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.core.internal.format.DefaultConfigFormatsSingletonSpi;
 import org.apache.tamaya.core.resource.Resource;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.apache.tamaya.core.spi.ConfigurationFormatsSingletonSpi;
 
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 
 import java.util.Collection;
-import java.util.Optional;
 
 /**
  * Singleton accessor for accessing {@link org.apache.tamaya.core.spi.ConfigurationFormat} instances.
@@ -36,25 +33,6 @@ import java.util.Optional;
 public final class ConfigurationFormats{
 
     /**
-     * Spi to which calls are effectively delegated, never null.
-     */
-    private static final ConfigurationFormatsSingletonSpi spi = loadSpi();
-
-    /**
-     * Method to load the spi fromMap the Bootstrap component.
-     *
-     * @return an instance current ConfigurationFormatsSingletonSpi, never null.
-     */
-    private static ConfigurationFormatsSingletonSpi loadSpi(){
-        try{
-            return Bootstrap.getService(ConfigurationFormatsSingletonSpi.class);
-        }
-        catch(Exception e){
-            return new DefaultConfigFormatsSingletonSpi();
-        }
-    }
-
-    /**
      * Private singleton constructor.
      */
     private ConfigurationFormats(){
@@ -68,9 +46,7 @@ public final class ConfigurationFormats{
      * not available for the given environment.
      */
     public static ConfigurationFormat getFormat(String formatName){
-        return Optional.ofNullable(spi)
-                .orElseThrow(() -> new ConfigException("No ConfigurationFormatsSingletonSpi loaded."))
-                .getFormat(formatName);
+        return ServiceContext.getInstance().getSingleton(ConfigurationFormatsSingletonSpi.class).getFormat(formatName);
     }
 
     /**
@@ -79,8 +55,7 @@ public final class ConfigurationFormats{
      * @return a collection current the keys current the registered {@link ConfigurationFormat} instances.
      */
     public static Collection<String> getFormatNames(){
-        return Optional.ofNullable(spi)
-                .orElseThrow(() -> new ConfigException("No ConfigurationFormatsSingletonSpi loaded.")).getFormatNames();
+        return ServiceContext.getInstance().getSingleton(ConfigurationFormatsSingletonSpi.class).getFormatNames();
     }
 
     /**
@@ -90,9 +65,7 @@ public final class ConfigurationFormats{
      * @return a matching configuration format, or {@code null} if no matching format could be determined.
      */
     public static ConfigurationFormat getFormat(Resource resource){
-        return Optional.ofNullable(spi)
-                .orElseThrow(() -> new ConfigException("No ConfigurationFormatsSingletonSpi loaded."))
-                .getFormat(resource);
+        return ServiceContext.getInstance().getSingleton(ConfigurationFormatsSingletonSpi.class).getFormat(resource);
 
     }
 
@@ -103,9 +76,7 @@ public final class ConfigurationFormats{
      * @return a format instance for reading configuration fromMap a {@code .properties} file, never null.
      */
     public static ConfigurationFormat getPropertiesFormat(){
-        return Optional.ofNullable(spi)
-                .orElseThrow(() -> new ConfigException("No ConfigurationFormatsSingletonSpi loaded."))
-                .getPropertiesFormat();
+        return ServiceContext.getInstance().getSingleton(ConfigurationFormatsSingletonSpi.class).getPropertiesFormat();
     }
 
     /**
@@ -115,9 +86,7 @@ public final class ConfigurationFormats{
      * @return a format instance for reading configuration fromMap a {@code .xml} properties file, never null.
      */
     public static ConfigurationFormat getXmlPropertiesFormat(){
-        return Optional.ofNullable(spi)
-                .orElseThrow(() -> new ConfigException("No ConfigurationFormatsSingletonSpi loaded."))
-                .getXmlPropertiesFormat();
+        return ServiceContext.getInstance().getSingleton(ConfigurationFormatsSingletonSpi.class).getXmlPropertiesFormat();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/config/FreezedConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/config/FreezedConfiguration.java b/core/src/main/java/org/apache/tamaya/core/config/FreezedConfiguration.java
index 86030bc..48c0cd1 100644
--- a/core/src/main/java/org/apache/tamaya/core/config/FreezedConfiguration.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/FreezedConfiguration.java
@@ -38,7 +38,7 @@ final class FreezedConfiguration extends AbstractConfiguration implements Serial
 
     private FreezedConfiguration(Configuration config){
         super(MetaInfoBuilder.of(config.getMetaInfo()).set("freezedAt", Instant.now().toString()).build());
-        this.properties = PropertySourceBuilder.create(config).buildFreezed();
+        this.properties = PropertySourceBuilder.of(config).buildFreezed();
         this.version = Objects.requireNonNull(config.getVersion());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/MetaConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/MetaConfig.java b/core/src/main/java/org/apache/tamaya/core/internal/MetaConfig.java
index 9ad862c..6a98fb8 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/MetaConfig.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/MetaConfig.java
@@ -20,7 +20,7 @@ package org.apache.tamaya.core.internal;
 
 import org.apache.tamaya.core.config.ConfigurationFormats;
 import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.apache.tamaya.core.resource.ResourceLoader;
 
@@ -45,7 +45,7 @@ public final class MetaConfig {
     private Map<String,String> properties = new HashMap<>();
 
     private MetaConfig(){
-        List<Resource> resources = Bootstrap.getService(ResourceLoader.class).getResources(MetaConfig.class.getClassLoader(),
+        List<Resource> resources = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(MetaConfig.class.getClassLoader(),
                 "classpath:META-INF/config.properties");
         for(Resource res:resources){
             try{

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/config/DefaultConfigurationManagerSingletonSpi.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/config/DefaultConfigurationManagerSingletonSpi.java b/core/src/main/java/org/apache/tamaya/core/internal/config/DefaultConfigurationManagerSingletonSpi.java
index 1576cf0..7234ec6 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/config/DefaultConfigurationManagerSingletonSpi.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/config/DefaultConfigurationManagerSingletonSpi.java
@@ -25,7 +25,7 @@ import org.apache.tamaya.core.properties.PropertySourceBuilder;
 import org.apache.tamaya.core.spi.ConfigurationProviderSpi;
 import org.apache.tamaya.core.spi.ExpressionEvaluator;
 
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.spi.ConfigurationManagerSingletonSpi;
 
 import java.lang.annotation.Annotation;
@@ -47,7 +47,7 @@ public class DefaultConfigurationManagerSingletonSpi implements ConfigurationMan
     private ExpressionEvaluator expressionEvaluator = loadEvaluator();
 
     private ExpressionEvaluator loadEvaluator() {
-        ExpressionEvaluator eval = Bootstrap.getService(ExpressionEvaluator.class, null);
+        ExpressionEvaluator eval = ServiceContext.getInstance().getService(ExpressionEvaluator.class).orElse(null);
         if (eval == null) {
             eval = new DefaultExpressionEvaluator();
         }
@@ -55,7 +55,7 @@ public class DefaultConfigurationManagerSingletonSpi implements ConfigurationMan
     }
 
     public DefaultConfigurationManagerSingletonSpi() {
-        for (ConfigurationProviderSpi spi : Bootstrap.getServices(ConfigurationProviderSpi.class)) {
+        for (ConfigurationProviderSpi spi : ServiceContext.getInstance().getServices(ConfigurationProviderSpi.class, Collections.emptyList())) {
             configProviders.put(spi.getConfigName(), spi);
         }
     }
@@ -188,12 +188,12 @@ public class DefaultConfigurationManagerSingletonSpi implements ConfigurationMan
         @Override
         public void reload() {
             this.configuration =
-                    PropertySourceBuilder.create(DEFAULT_CONFIG_NAME)
-                            .addProviders(PropertySourceBuilder.create("CL default")
+                    PropertySourceBuilder.of(DEFAULT_CONFIG_NAME)
+                            .addProviders(PropertySourceBuilder.of("CL default")
                                     .withAggregationPolicy(AggregationPolicy.LOG_ERROR)
                                     .addPaths("META-INF/cfg/default/**/*.xml", "META-INF/cfg/default/**/*.properties", "META-INF/cfg/default/**/*.ini")
                                     .build())
-                            .addProviders(PropertySourceBuilder.create("CL default")
+                            .addProviders(PropertySourceBuilder.of("CL default")
                                     .withAggregationPolicy(AggregationPolicy.LOG_ERROR)
                                     .addPaths("META-INF/cfg/config/**/*.xml", "META-INF/cfg/config/**/*.properties", "META-INF/cfg/config/**/*.ini")
                                     .build())

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/config/EnvPropertiesConfigProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/config/EnvPropertiesConfigProvider.java b/core/src/main/java/org/apache/tamaya/core/internal/config/EnvPropertiesConfigProvider.java
index 5f2263e..1494e7a 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/config/EnvPropertiesConfigProvider.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/config/EnvPropertiesConfigProvider.java
@@ -34,7 +34,7 @@ public class EnvPropertiesConfigProvider implements ConfigurationProviderSpi{
     private Configuration envConfig;
 
     public EnvPropertiesConfigProvider(){
-        envConfig = PropertySourceBuilder.create("environment.properties").addEnvironmentProperties().build().toConfiguration();
+        envConfig = PropertySourceBuilder.of("environment.properties").addEnvironmentProperties().build().toConfiguration();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/config/SystemPropertiesConfigProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/config/SystemPropertiesConfigProvider.java b/core/src/main/java/org/apache/tamaya/core/internal/config/SystemPropertiesConfigProvider.java
index 54453c5..4f42b95 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/config/SystemPropertiesConfigProvider.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/config/SystemPropertiesConfigProvider.java
@@ -34,7 +34,7 @@ public class SystemPropertiesConfigProvider implements ConfigurationProviderSpi{
     private Configuration systemConfig;
 
     public SystemPropertiesConfigProvider(){
-        systemConfig = PropertySourceBuilder.create("system.properties").addSystemProperties().build().toConfiguration();
+        systemConfig = PropertySourceBuilder.of("system.properties").addSystemProperties().build().toConfiguration();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/el/DefaultExpressionEvaluator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/el/DefaultExpressionEvaluator.java b/core/src/main/java/org/apache/tamaya/core/internal/el/DefaultExpressionEvaluator.java
index b42d568..e5baecc 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/el/DefaultExpressionEvaluator.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/el/DefaultExpressionEvaluator.java
@@ -19,8 +19,7 @@
 package org.apache.tamaya.core.internal.el;
 
 import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.spi.ExpressionEvaluator;
 import org.apache.tamaya.core.spi.ExpressionResolver;
 
@@ -37,10 +36,10 @@ public final class DefaultExpressionEvaluator implements ExpressionEvaluator{
     private ExpressionResolver defaultResolver;
 
     public DefaultExpressionEvaluator() {
-        for(ExpressionResolver resolver: Bootstrap.getServices(ExpressionResolver.class)){
+        for(ExpressionResolver resolver: ServiceContext.getInstance().getServices(ExpressionResolver.class)){
             resolvers.put(resolver.getResolverId(), resolver);
         }
-        defaultResolver = Bootstrap.getService(ExpressionResolver.class);
+        defaultResolver = ServiceContext.getInstance().getSingleton(ExpressionResolver.class);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentApplicationEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentApplicationEnvironmentProvider.java b/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentApplicationEnvironmentProvider.java
index f6afe65..b16ed8d 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentApplicationEnvironmentProvider.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentApplicationEnvironmentProvider.java
@@ -22,7 +22,7 @@ import org.apache.tamaya.Environment;
 import org.apache.tamaya.core.config.ConfigurationFormats;
 import org.apache.tamaya.core.env.EnvironmentBuilder;
 import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.apache.tamaya.core.spi.EnvironmentProvider;
 import org.apache.tamaya.core.resource.ResourceLoader;
@@ -65,7 +65,7 @@ public class ClassLoaderDependentApplicationEnvironmentProvider implements Envir
         if(available!=null && !available){
             return false;
         }
-        List<Resource> propertyUris = Bootstrap.getService(ResourceLoader.class).getResources(cl,
+        List<Resource> propertyUris = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
                 "classpath:META-INF/env/application.properties", "classpath:META-INF/env/application.xml", "classpath:META-INF/env/application.ini");
         available = !propertyUris.isEmpty();
         this.environmentAvailable.put(cl, available);
@@ -82,7 +82,7 @@ public class ClassLoaderDependentApplicationEnvironmentProvider implements Envir
         if(environment!=null){
             return environment;
         }
-        List<Resource> propertyUris = Bootstrap.getService(ResourceLoader.class).getResources(cl,
+        List<Resource> propertyUris = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
                 "classpath:META-INF/env/application.properties", "classpath:META-INF/env/application.xml", "classpath:META-INF/env/application.ini");
         Map<String,String> data = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentEarEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentEarEnvironmentProvider.java b/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentEarEnvironmentProvider.java
index e1d30a3..e389156 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentEarEnvironmentProvider.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/env/ClassLoaderDependentEarEnvironmentProvider.java
@@ -23,7 +23,7 @@ import org.apache.tamaya.Stage;
 import org.apache.tamaya.core.config.ConfigurationFormats;
 import org.apache.tamaya.core.env.EnvironmentBuilder;
 import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.core.spi.ConfigurationFormat;
 import org.apache.tamaya.core.spi.EnvironmentProvider;
 import org.apache.tamaya.core.resource.ResourceLoader;
@@ -68,7 +68,7 @@ public class ClassLoaderDependentEarEnvironmentProvider implements EnvironmentPr
         if(available!=null && !available){
             return false;
         }
-        List<Resource> propertyUris = Bootstrap.getService(ResourceLoader.class).getResources(cl,
+        List<Resource> propertyUris = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
                 "classpath:META-INF/env/ear.properties", "classpath:META-INF/env/ear.xml", "classpath:META-INF/env/ear.ini");
         available = !propertyUris.isEmpty();
         this.environmentAvailable.put(cl, available);
@@ -85,7 +85,7 @@ public class ClassLoaderDependentEarEnvironmentProvider implements EnvironmentPr
         if(environment!=null){
             return environment;
         }
-        List<Resource> resources = Bootstrap.getService(ResourceLoader.class).getResources(cl,
+        List<Resource> resources = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
                 "classpath:META-INF/env/ear.properties", "classpath:META-INF/env/ear.xml", "classpath:META-INF/env/ear.ini");
         Map<String,String> data = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/123a4afc/core/src/main/java/org/apache/tamaya/core/internal/env/SingleEnvironmentManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/env/SingleEnvironmentManager.java b/core/src/main/java/org/apache/tamaya/core/internal/env/SingleEnvironmentManager.java
index 5c3d52a..6d75ac2 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/env/SingleEnvironmentManager.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/env/SingleEnvironmentManager.java
@@ -21,7 +21,7 @@ package org.apache.tamaya.core.internal.env;
 import org.apache.tamaya.Environment;
 
 import org.apache.tamaya.core.internal.MetaConfig;
-import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.spi.EnvironmentManagerSingletonSpi;
 import org.apache.tamaya.core.spi.EnvironmentProvider;
 
@@ -46,7 +46,7 @@ public class SingleEnvironmentManager implements EnvironmentManagerSingletonSpi{
     private final List<EnvironmentProvider> environmentProviders = loadEnvironmentProviders();
 
     private List<EnvironmentProvider> loadEnvironmentProviders() {
-        for(EnvironmentProvider prov: Bootstrap.getServices(EnvironmentProvider.class)){
+        for(EnvironmentProvider prov: ServiceContext.getInstance().getServices(EnvironmentProvider.class)){
             providerMap.put(prov.getEnvironmentType(), prov);
         }
         String providerOrdering = MetaConfig.getOrDefault(ENVIRONMENT_ORDER_KEY, DEFAULT_ENVIRONMENT_ORDER);


[3/3] incubator-tamaya git commit: Merge remote-tracking branch 'origin/master'

Posted by an...@apache.org.
Merge remote-tracking branch 'origin/master'

Conflicts:
	core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/c6fa7c67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/c6fa7c67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/c6fa7c67

Branch: refs/heads/master
Commit: c6fa7c677c0dbbb34ff82de1b8ee7d325f2957a7
Parents: 123a4af 9ac2684
Author: anatole <an...@apache.org>
Authored: Mon Dec 15 00:50:21 2014 +0100
Committer: anatole <an...@apache.org>
Committed: Mon Dec 15 00:50:21 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/tamaya/core/config/ConfigFunctions.java     | 4 ++--
 .../tamaya/core/internal/resources/io/AntPathMatcher.java       | 2 +-
 .../resources/io/PathMatchingResourcePatternResolver.java       | 4 ++--
 .../apache/tamaya/core/internal/resources/io/StringUtils.java   | 2 +-
 .../apache/tamaya/core/properties/AggregatedPropertySource.java | 4 +---
 .../apache/tamaya/core/properties/ReplacingPropertySource.java  | 5 ++---
 6 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c6fa7c67/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
index 3075f8c,f46473a..c9d924f
--- a/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
@@@ -63,8 -63,8 +63,8 @@@ public final class ConfigFunctions 
                              .filter(e -> isKeyInArea(e.getKey(), areaKey))
                              .collect(Collectors.toMap(
                                      e -> stripKeys ? e.getKey().substring(areaKey.length() + 1) : e.getKey(),
-                                     e -> e.getValue())));
+                                     Map.Entry::getValue)));
 -            return PropertySourceBuilder.create("area: " + areaKey).addMap(area).build().toConfiguration();
 +            return PropertySourceBuilder.of("area: " + areaKey).addMap(area).build().toConfiguration();
          };
      }
  
@@@ -110,8 -110,8 +110,8 @@@
                              .filter(e -> e.getKey().startsWith(lookupKey))
                              .collect(Collectors.toMap(
                                      e -> stripKeys ? e.getKey().substring(areaKey.length() + 1) : e.getKey(),
-                                     e -> e.getValue())));
+                                     Map.Entry::getValue)));
 -            return PropertySourceBuilder.create("area (recursive): " + areaKey).addMap(area).build().toConfiguration();
 +            return PropertySourceBuilder.of("area (recursive): " + areaKey).addMap(area).build().toConfiguration();
          };
      }