incubator-tamaya git commit: TAMAYA-273 Tamaya logs initial setup on startup on info level.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master e1817f2b4 -> 5a130523a


TAMAYA-273 Tamaya logs initial setup on startup on info level.


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

Branch: refs/heads/master
Commit: 5a130523ab7d3a9d33091b13f62db90ddb8fba5c
Parents: e1817f2
Author: Anatole Tresch 
Authored: Tue Jul 10 17:15:35 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 17:15:35 2018 +0200

--
 .../api/src/main/java/org/apache/tamaya/ConfigurationProvider.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/5a130523/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
--
diff --git 
a/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java 
b/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
index 75bda06..bb32550 100644
--- a/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
+++ b/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
@@ -35,6 +35,8 @@ public final class ConfigurationProvider {
 if(spi==null){
 throw new IllegalStateException("ConfigurationProviderSpi not 
available.");
 }
+LOG.finest("TAMAYA Delegate: " + spi.getClass().getName());
+LOG.info("TAMAYA Configuration : " + spi.getConfiguration());
 return spi;
 }
 



[2/2] incubator-tamaya-sandbox git commit: TAMAYA-308 Fixed config assignment in constructor.

2018-07-10 Thread anatole
TAMAYA-308 Fixed config assignment in constructor.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: 71f8928e065573600e97cae9306a7423a88ed06c
Parents: 856e060
Author: Anatole Tresch 
Authored: Tue Jul 10 16:50:39 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:50:39 2018 +0200

--
 .../java/org/apache/tamaya/commons/CommonsConfigConfigSource.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/71f8928e/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigConfigSource.java
--
diff --git 
a/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigConfigSource.java
 
b/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigConfigSource.java
index f2f4f55..70bb43d 100644
--- 
a/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigConfigSource.java
+++ 
b/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigConfigSource.java
@@ -39,7 +39,7 @@ public class CommonsConfigConfigSource implements 
ConfigSource {
 }
 
 public CommonsConfigConfigSource(String name, Configuration commonsConfig) 
{
-commonsConfig = Objects.requireNonNull(commonsConfig);
+this.commonsConfig = Objects.requireNonNull(commonsConfig);
 this.name = Objects.requireNonNull(name);
 try {
 this.ordinal = commonsConfig.getInt(ConfigSource.CONFIG_ORDINAL);



[1/2] incubator-tamaya-sandbox git commit: Fixed some license refs. Renamed some artifacts for better compliance with JSR.

2018-07-10 Thread anatole
Repository: incubator-tamaya-sandbox
Updated Branches:
  refs/heads/configjsr 87cf9c2c4 -> 71f8928e0


Fixed some license refs.
Renamed some artifacts for better compliance with JSR.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: 856e060b624a7706f3e1d7857545f493f75f54d0
Parents: 87cf9c2
Author: Anatole Tresch 
Authored: Sun Apr 22 18:24:06 2018 +0200
Committer: Anatole Tresch 
Committed: Sun Apr 22 18:24:06 2018 +0200

--
 .../org/apache/tamaya/metamodel/MetaConfig.java | 140 +++
 .../tamaya/metamodel/MetaConfiguration.java | 140 ---
 .../internal/CombinationPolicyReader.java   |   4 +-
 .../internal/ConfigSourceOrderingReader.java|   4 +-
 .../metamodel/internal/ConfigSourceReader.java  |   4 +-
 .../metamodel/internal/ConverterReader.java |   4 +-
 .../internal/DSLBasedConfigFactory.java |   8 +-
 .../internal/FilterOrderingReader.java  |   4 +-
 .../tamaya/metamodel/internal/FilterReader.java |   4 +-
 .../metamodel/internal/MetaContextReader.java   |   4 +-
 .../tamaya/metamodel/spi/MetaConfigReader.java  |  41 ++
 .../metamodel/spi/MetaConfigurationReader.java  |  41 --
 ...apache.tamaya.metamodel.spi.MetaConfigReader |  25 
 ...tamaya.metamodel.spi.MetaConfigurationReader |  25 
 .../tamaya/metamodel/ext/IntegrationTest.java   |  24 ++--
 .../internal/resolver/LoggingReader.java|   4 +-
 ...apache.tamaya.metamodel.spi.MetaConfigReader |  19 +++
 ...tamaya.metamodel.spi.MetaConfigurationReader |  19 ---
 18 files changed, 257 insertions(+), 257 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/856e060b/metamodel/src/main/java/org/apache/tamaya/metamodel/MetaConfig.java
--
diff --git 
a/metamodel/src/main/java/org/apache/tamaya/metamodel/MetaConfig.java 
b/metamodel/src/main/java/org/apache/tamaya/metamodel/MetaConfig.java
new file mode 100644
index 000..ea0844d
--- /dev/null
+++ b/metamodel/src/main/java/org/apache/tamaya/metamodel/MetaConfig.java
@@ -0,0 +1,140 @@
+/*
+ * 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.metamodel;
+
+import org.apache.tamaya.base.ServiceContext;
+import org.apache.tamaya.metamodel.spi.MetaConfigReader;
+import org.apache.tamaya.base.ServiceContextManager;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import javax.config.Config;
+import javax.config.spi.ConfigBuilder;
+import javax.config.spi.ConfigProviderResolver;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Objects;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Accessor singleton for accessing/loading meta-configuration.
+ */
+public final class MetaConfig {
+
+private static final String CONFIG_RESOURCE = "tamaya-config.xml";
+
+private static final Logger LOG = 
Logger.getLogger(MetaConfig.class.getName());
+
+/**
+ * Singleton constructor.
+ */
+private MetaConfig(){}
+
+/**
+ * Creates a new {@link Config} using {@link #createConfig(URL)}
+ * and applies it as default configuration using {@link 
ConfigProviderResolver#registerConfig(Config, ClassLoader)} .
+ */
+public static void configure(ClassLoader classLoader){
+LOG.info("TAMAYA: Checking for meta-configuration...");
+URL configFile = getDefaultMetaConfig();
+if(configFile==null){
+LOG.warning("TAMAYA: No " + CONFIG_RESOURCE + " found, using 
defaults.");
+ 

incubator-tamaya-sandbox git commit: TAMAYA-308 Fixed config assignment in constructor.

2018-07-10 Thread anatole
Repository: incubator-tamaya-sandbox
Updated Branches:
  refs/heads/master ed8bd26f1 -> 96fc9d5cb


TAMAYA-308 Fixed config assignment in constructor.


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

Branch: refs/heads/master
Commit: 96fc9d5cbd8d4170af2908d8ba88ed5aa19eae22
Parents: ed8bd26
Author: Anatole Tresch 
Authored: Tue Jul 10 16:49:48 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:49:48 2018 +0200

--
 .../org/apache/tamaya/commons/CommonsConfigPropertySource.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/96fc9d5c/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigPropertySource.java
--
diff --git 
a/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigPropertySource.java
 
b/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigPropertySource.java
index 2383e68..206878a 100644
--- 
a/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigPropertySource.java
+++ 
b/apache-commons/src/main/java/org/apache/tamaya/commons/CommonsConfigPropertySource.java
@@ -40,7 +40,7 @@ public class CommonsConfigPropertySource implements 
PropertySource {
 }
 
 public CommonsConfigPropertySource(String name, Configuration 
commonsConfig) {
-commonsConfig = Objects.requireNonNull(commonsConfig);
+this.commonsConfig = Objects.requireNonNull(commonsConfig);
 this.name = Objects.requireNonNull(name);
 try {
 this.ordinal = commonsConfig.getInt(PropertySource.TAMAYA_ORDINAL);



incubator-tamaya git commit: TAMAYA-305 Removed useless OSGI component annotation, since enum converters are created and registered on the fly by Tamaya.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/configjsr 9cc5fba7a -> 94e32c4e0


TAMAYA-305 Removed useless OSGI component annotation, since enum converters are 
created and registered on the fly by Tamaya.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: 94e32c4e098236facb67824addc9ba62d98bc8ed
Parents: 9cc5fba
Author: Anatole Tresch 
Authored: Tue Jul 10 16:46:17 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:46:17 2018 +0200

--
 .../src/main/java/org/apache/tamaya/base/convert/EnumConverter.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/94e32c4e/code/base/src/main/java/org/apache/tamaya/base/convert/EnumConverter.java
--
diff --git 
a/code/base/src/main/java/org/apache/tamaya/base/convert/EnumConverter.java 
b/code/base/src/main/java/org/apache/tamaya/base/convert/EnumConverter.java
index 47e53c7..c520134 100644
--- a/code/base/src/main/java/org/apache/tamaya/base/convert/EnumConverter.java
+++ b/code/base/src/main/java/org/apache/tamaya/base/convert/EnumConverter.java
@@ -31,7 +31,6 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to tge given enum type.
  */
-//@Component(service = Converter.class)
 public class EnumConverter implements Converter {
 private final Logger LOG = Logger.getLogger(EnumConverter.class.getName());
 private Class enumType;



incubator-tamaya-extensions git commit: Added default implementation of access.

2018-07-10 Thread anatole
Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/configjsr 092869379 -> ca5823c6a


Added default implementation of access.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: ca5823c6a198314fe6bbf271e5131b3cef6d953d
Parents: 0928693
Author: Anatole Tresch 
Authored: Tue Jul 10 16:46:42 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:46:42 2018 +0200

--
 .../apache/tamaya/resolver/NonResolvableConfig.java | 16 
 1 file changed, 16 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ca5823c6/modules/resolver/src/test/java/org/apache/tamaya/resolver/NonResolvableConfig.java
--
diff --git 
a/modules/resolver/src/test/java/org/apache/tamaya/resolver/NonResolvableConfig.java
 
b/modules/resolver/src/test/java/org/apache/tamaya/resolver/NonResolvableConfig.java
index 33429ca..15ec98b 100644
--- 
a/modules/resolver/src/test/java/org/apache/tamaya/resolver/NonResolvableConfig.java
+++ 
b/modules/resolver/src/test/java/org/apache/tamaya/resolver/NonResolvableConfig.java
@@ -18,10 +18,16 @@
  */
 package org.apache.tamaya.resolver;
 
+import org.apache.tamaya.base.ConfigContextSupplier;
+import org.apache.tamaya.base.DefaultConfigValue;
+
 import javax.config.Config;
+import javax.config.ConfigValue;
 import javax.config.spi.ConfigSource;
 import java.util.Arrays;
 import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
 
 /**
  * Implements s simple config just based on the {@link MyTestConfigSource}, 
without any
@@ -45,6 +51,11 @@ public class NonResolvableConfig implements Config{
 }
 
 @Override
+public ConfigValue access(String s) {
+return new DefaultConfigValue<>(this, ConfigContextSupplier.of(this), 
s, String.class);
+}
+
+@Override
 public Iterable getPropertyNames() {
 return configDelegate.getPropertyNames();
 }
@@ -53,4 +64,9 @@ public class NonResolvableConfig implements Config{
 public Iterable getConfigSources() {
 return Arrays.asList(new ConfigSource[]{configDelegate});
 }
+
+@Override
+public void registerConfigChangedListener(Consumer> consumer) {
+
+}
 }



incubator-tamaya git commit: TAMAYA-305 Removed useless OSGI component annotation, since enum converters are created and registered on the fly by Tamaya.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master f0043f47b -> e1817f2b4


TAMAYA-305 Removed useless OSGI component annotation, since enum converters are 
created and registered on the fly by Tamaya.


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

Branch: refs/heads/master
Commit: e1817f2b4230bb3a13e1f99f9c5479a2d0d3ed2b
Parents: f0043f4
Author: Anatole Tresch 
Authored: Tue Jul 10 16:44:52 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:44:52 2018 +0200

--
 .../src/main/java/org/apache/tamaya/spisupport/EnumConverter.java   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e1817f2b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/EnumConverter.java
--
diff --git 
a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/EnumConverter.java
 
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/EnumConverter.java
index 01499d4..af22d8c 100644
--- 
a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/EnumConverter.java
+++ 
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/EnumConverter.java
@@ -33,7 +33,6 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to the given enum type.
  */
-@Component(service = PropertyConverter.class)
 public class EnumConverter implements PropertyConverter {
 private final Logger LOG = Logger.getLogger(EnumConverter.class.getName());
 private Class enumType;



incubator-tamaya-extensions git commit: TAMAYA-336 Added javadoc.

2018-07-10 Thread anatole
Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/master 54351ccb3 -> f5d49016f


TAMAYA-336 Added javadoc.


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

Branch: refs/heads/master
Commit: f5d49016fcfb31ed44a14ff76abe9d1a422884c1
Parents: 54351cc
Author: Anatole Tresch 
Authored: Tue Jul 10 16:36:02 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:36:02 2018 +0200

--
 .../tamaya/inject/internal/ConfigTemplateInvocationHandler.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/f5d49016/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
--
diff --git 
a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
 
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
index e7a9318..b858230 100644
--- 
a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
+++ 
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
@@ -43,6 +43,7 @@ public final class ConfigTemplateInvocationHandler implements 
InvocationHandler
  * Creates a new handler instance.
  *
  * @param type  the target type, not null.
+ * @param configthe target config, not null.
  */
 public ConfigTemplateInvocationHandler(Class type, Configuration 
config) {
 this.type = new ConfiguredTypeImpl(Objects.requireNonNull(type));



incubator-tamaya-extensions git commit: TAMAYA-336 Now forwarding target config instance.

2018-07-10 Thread anatole
Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/master 396f1a738 -> 54351ccb3


TAMAYA-336 Now forwarding target config instance.


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

Branch: refs/heads/master
Commit: 54351ccb3df31da60db456b18491533bd2b8b5b6
Parents: 396f1a7
Author: Anatole Tresch 
Authored: Tue Jul 10 16:31:56 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 16:31:56 2018 +0200

--
 .../ConfigTemplateInvocationHandler.java|  5 ++--
 .../internal/DefaultConfigurationInjector.java  |  2 +-
 .../tamaya/inject/TamayaInjectionTest.java  | 30 +++-
 3 files changed, 33 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/54351ccb/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
--
diff --git 
a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
 
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
index fd9f7be..e7a9318 100644
--- 
a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
+++ 
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/ConfigTemplateInvocationHandler.java
@@ -37,23 +37,24 @@ public final class ConfigTemplateInvocationHandler 
implements InvocationHandler
  * The configured type.
  */
 private final ConfiguredType type;
+private Configuration config;
 
 /**
  * Creates a new handler instance.
  *
  * @param type  the target type, not null.
  */
-public ConfigTemplateInvocationHandler(Class type) {
+public ConfigTemplateInvocationHandler(Class type, Configuration 
config) {
 this.type = new ConfiguredTypeImpl(Objects.requireNonNull(type));
 if (!type.isInterface()) {
 throw new IllegalArgumentException("Can only proxy interfaces as 
configuration templates.");
 }
+this.config = Objects.requireNonNull(config);
 InjectionHelper.sendConfigurationEvent(this.type);
 }
 
 @Override
 public Object invoke(Object proxy, Method method, Object[] args) throws 
Throwable {
-Configuration config = ConfigurationProvider.getConfiguration();
 if ("toString".equals(method.getName())) {
 return "Configured Proxy -> " + this.type.getType().getName();
 } else if ("hashCode".equals(method.getName())) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/54351ccb/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultConfigurationInjector.java
--
diff --git 
a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultConfigurationInjector.java
 
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultConfigurationInjector.java
index 7b3fb61..01a09e9 100644
--- 
a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultConfigurationInjector.java
+++ 
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultConfigurationInjector.java
@@ -162,7 +162,7 @@ public class DefaultConfigurationInjector implements 
ConfigurationInjector {
 cl = this.getClass().getClassLoader();
 }
 return templateType.cast(Proxy.newProxyInstance(cl, new 
Class[]{Supplier.class, Objects.requireNonNull(templateType)},
-new ConfigTemplateInvocationHandler(templateType)));
+new ConfigTemplateInvocationHandler(templateType, config)));
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/54351ccb/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/TamayaInjectionTest.java
--
diff --git 
a/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/TamayaInjectionTest.java
 
b/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/TamayaInjectionTest.java
index b95d491..61e3d43 100644
--- 
a/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/TamayaInjectionTest.java
+++ 

incubator-tamaya git commit: TAMAYA-344 Removed unnecessary lazy activation policy.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master f33fb9d0c -> f0043f47b


TAMAYA-344 Removed unnecessary lazy activation policy.


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

Branch: refs/heads/master
Commit: f0043f47bf2ce025f6344dd8ab1551de635c0f48
Parents: f33fb9d
Author: Anatole Tresch 
Authored: Tue Jul 10 15:53:52 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 15:53:52 2018 +0200

--
 code/api/bnd.bnd | 1 -
 code/spi-support/bnd.bnd | 1 -
 2 files changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f0043f47/code/api/bnd.bnd
--
diff --git a/code/api/bnd.bnd b/code/api/bnd.bnd
index 0ad7821..97f65cc 100644
--- a/code/api/bnd.bnd
+++ b/code/api/bnd.bnd
@@ -20,7 +20,6 @@ Bundle-License: Apache Licence version 2
 Bundle-Vendor: Apache Software Foundation
 Bundle-ContactAddress: dev-tam...@incubator.apache.org
 Bundle-DocURL: http://tamaya.apache.org
-Bundle-ActivationPolicy: lazy
 Export-Package: \
org.apache.tamaya,\
org.apache.tamaya.spi

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f0043f47/code/spi-support/bnd.bnd
--
diff --git a/code/spi-support/bnd.bnd b/code/spi-support/bnd.bnd
index 2dc253a..89db115 100644
--- a/code/spi-support/bnd.bnd
+++ b/code/spi-support/bnd.bnd
@@ -10,7 +10,6 @@ javac.source: 1.8
 javac.target: 1.8
 
 Automatic-Module-Name: org.apache.tamaya.spisupport
-Bundle-ActivationPolicy: lazy
 Bundle-Version: ${version}.${tstamp}
 Bundle-Name: Apache Tamaya - SPI Support
 Bundle-SymbolicName: org.apache.tamaya.spisupport



incubator-tamaya git commit: Refactored ConfigContext/Supplier handling.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/configjsr 2bebc0e4e -> 9cc5fba7a


Refactored ConfigContext/Supplier handling.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: 9cc5fba7a147df6da68065c1d96ac5989009577f
Parents: 2bebc0e
Author: Anatole Tresch 
Authored: Tue Jul 10 15:52:49 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 15:52:49 2018 +0200

--
 .../org/apache/tamaya/base/ConfigContext.java   | 29 +---
 .../tamaya/base/ConfigContextSupplier.java  | 50 
 2 files changed, 51 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9cc5fba7/code/base/src/main/java/org/apache/tamaya/base/ConfigContext.java
--
diff --git a/code/base/src/main/java/org/apache/tamaya/base/ConfigContext.java 
b/code/base/src/main/java/org/apache/tamaya/base/ConfigContext.java
index cfd8007..41e6f0e 100644
--- a/code/base/src/main/java/org/apache/tamaya/base/ConfigContext.java
+++ b/code/base/src/main/java/org/apache/tamaya/base/ConfigContext.java
@@ -46,34 +46,7 @@ public interface ConfigContext {
  * @return a context instance, never null.
  */
 static ConfigContext from(Config config){
-if(config instanceof ConfigContextSupplier){
-return ((ConfigContextSupplier)config).getConfigContext();
-}
-return new ConfigContext() {
-@Override
-public List getConfigSources() {
-List configSources = new ArrayList<>();
-for(ConfigSource cs:config.getConfigSources()){
-configSources.add(cs);
-}
-return configSources;
-}
-
-@Override
-public List getFilters() {
-return Collections.emptyList();
-}
-
-@Override
-public Map> getConverters() {
-return ConverterManager.defaultInstance().getConverters();
-}
-
-@Override
-public String toString() {
-return "ConfigContext#default{\n  delegate:"+config+"\n}";
-}
-};
+return ConfigContextSupplier.of(config).getConfigContext();
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9cc5fba7/code/base/src/main/java/org/apache/tamaya/base/ConfigContextSupplier.java
--
diff --git 
a/code/base/src/main/java/org/apache/tamaya/base/ConfigContextSupplier.java 
b/code/base/src/main/java/org/apache/tamaya/base/ConfigContextSupplier.java
index 9e3be69..1466f3e 100644
--- a/code/base/src/main/java/org/apache/tamaya/base/ConfigContextSupplier.java
+++ b/code/base/src/main/java/org/apache/tamaya/base/ConfigContextSupplier.java
@@ -18,8 +18,17 @@
  */
 package org.apache.tamaya.base;
 
+import org.apache.tamaya.base.convert.ConverterManager;
+import org.apache.tamaya.base.filter.Filter;
+
+import javax.config.Config;
 import javax.config.spi.ConfigSource;
 import javax.config.spi.Converter;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Central SPI for programmatically dealing with the setup of the 
configuration system.
@@ -30,6 +39,47 @@ import javax.config.spi.Converter;
 public interface ConfigContextSupplier {
 
 /**
+ * Get a context supplier from the given {@link Config}. If the {@link 
Config} implements
+ * {@link ConfigContextSupplier} it is cast and the result will be 
returned. If the
+ * config does not implement {@link ConfigContextSupplier}, a default 
context is created,
+ * which includes all convereters as defined by {@link 
ConverterManager#defaultInstance()#getConverters()},
+ * an empty filter list and the {@link ConfigSource}s as declared by the 
given {@link Config}
+ * instance.
+ * @param config the config instance, not null.
+ * @return a context supplier instance, never null.
+ */
+static ConfigContextSupplier of(Config config){
+if(config instanceof ConfigContextSupplier){
+return (ConfigContextSupplier)config;
+}
+return () -> new ConfigContext() {
+@Override
+public List getConfigSources() {
+List configSources = new ArrayList<>();
+for(ConfigSource cs:config.getConfigSources()){
+

[2/2] incubator-tamaya git commit: TAMAYA-344 Added lazy initialization to core.

2018-07-10 Thread anatole
TAMAYA-344 Added lazy initialization to core.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: 2bebc0e4e574330aee142c5b0f9230afbdbb1019
Parents: cf11395
Author: Anatole Tresch 
Authored: Tue Jul 10 15:51:53 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 15:51:53 2018 +0200

--
 code/core/bnd.bnd | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2bebc0e4/code/core/bnd.bnd
--
diff --git a/code/core/bnd.bnd b/code/core/bnd.bnd
index 4ce56bb..acf249c 100644
--- a/code/core/bnd.bnd
+++ b/code/core/bnd.bnd
@@ -21,6 +21,7 @@ Bundle-Vendor: Apache Software Foundation
 Bundle-ContactAddress: dev-tam...@incubator.apache.org
 Bundle-DocURL: http://tamaya.apache.org
 Bundle-Activator: org.apache.tamaya.core.OSGIActivator
+Bundle-ActivationPolicy: lazy
 Export-Package: \
org.apache.tamaya.core
 Import-Package: \



[1/2] incubator-tamaya git commit: Added JSR feature of special environment variable resolution handling.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/configjsr 6ddfdf923 -> 2bebc0e4e


Added JSR feature of special environment variable resolution handling.

Signed-off-by: Anatole Tresch 


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

Branch: refs/heads/configjsr
Commit: cf11395a5d90c65333e9531e93f8b93aa8791df7
Parents: 6ddfdf9
Author: Anatole Tresch 
Authored: Tue Jun 5 11:27:45 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jun 5 11:27:45 2018 +0200

--
 .../configsource/EnvironmentConfigSource.java   | 30 ++--
 1 file changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf11395a/code/base/src/main/java/org/apache/tamaya/base/configsource/EnvironmentConfigSource.java
--
diff --git 
a/code/base/src/main/java/org/apache/tamaya/base/configsource/EnvironmentConfigSource.java
 
b/code/base/src/main/java/org/apache/tamaya/base/configsource/EnvironmentConfigSource.java
index 2e45bb0..b9e42ab 100644
--- 
a/code/base/src/main/java/org/apache/tamaya/base/configsource/EnvironmentConfigSource.java
+++ 
b/code/base/src/main/java/org/apache/tamaya/base/configsource/EnvironmentConfigSource.java
@@ -80,6 +80,21 @@ import java.util.Map;
  *
  * The output of application would be {@code moon}.
  *
+ * Environment Variable Resolution
+ *
+ * As defined in the current configuration JSR, the environment config 
source will
+ * use an enhanced resolution mechanism to handle some constraints of operating
+ * systems not being able to handle dots in environment variable keys:
+ *
+ * Depending on the operating system type, environment variables with . are 
not always allowed. This ConfigSource searches 3 environment variables for a 
given property name (e.g. com.ACME.size):
+ * 
+ * Exact match (i.e. com.ACME.size)
+ * Replace all . by _ (i.e. com_ACME_size)
+ * Replace all . by _ and convert to upper case (i.e. 
COM_ACME_SIZE)
+ * 
+ * The first environment variable that is found is returned by this 
ConfigSource.
+ * 
+ *
  * Disabling the access to environment variables
  *
  * The access to environment variables could be simply
@@ -195,9 +210,20 @@ public class EnvironmentConfigSource extends 
BaseConfigSource {
 if (isDisabled()) {
 return null;
 }
+// Exact match (i.e. com.ACME.size)
 String effectiveKey = hasPrefix() ? getPrefix() + "." + key
-  : key;
-return getPropertiesProvider().getenv(effectiveKey);
+: key;
+String value = getPropertiesProvider().getenv(effectiveKey);
+// Replace all . by _ (i.e. com_ACME_size)
+if(value==null){
+value = 
getPropertiesProvider().getenv(effectiveKey.replaceAll(".", "_"));
+}
+// Replace all . by _ and convert to upper case (i.e. COM_ACME_SIZE)
+if(value==null){
+value = 
getPropertiesProvider().getenv(effectiveKey.replaceAll(".", "_")
+.toUpperCase());
+}
+return value;
 }
 
 private boolean hasPrefix() {



incubator-tamaya git commit: TAMAYA-344 Added lazy activation policy to API/core.

2018-07-10 Thread anatole
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 27d62b056 -> f33fb9d0c


TAMAYA-344 Added lazy activation policy to API/core.


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

Branch: refs/heads/master
Commit: f33fb9d0c3a45311920b8d2554ce4dd3fc37e89a
Parents: 27d62b0
Author: Anatole Tresch 
Authored: Tue Jul 10 15:46:31 2018 +0200
Committer: Anatole Tresch 
Committed: Tue Jul 10 15:46:31 2018 +0200

--
 code/api/bnd.bnd | 1 +
 code/core/bnd.bnd| 1 +
 code/spi-support/bnd.bnd | 1 +
 3 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f33fb9d0/code/api/bnd.bnd
--
diff --git a/code/api/bnd.bnd b/code/api/bnd.bnd
index 97f65cc..0ad7821 100644
--- a/code/api/bnd.bnd
+++ b/code/api/bnd.bnd
@@ -20,6 +20,7 @@ Bundle-License: Apache Licence version 2
 Bundle-Vendor: Apache Software Foundation
 Bundle-ContactAddress: dev-tam...@incubator.apache.org
 Bundle-DocURL: http://tamaya.apache.org
+Bundle-ActivationPolicy: lazy
 Export-Package: \
org.apache.tamaya,\
org.apache.tamaya.spi

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f33fb9d0/code/core/bnd.bnd
--
diff --git a/code/core/bnd.bnd b/code/core/bnd.bnd
index e029d21..bde0525 100644
--- a/code/core/bnd.bnd
+++ b/code/core/bnd.bnd
@@ -21,6 +21,7 @@ Bundle-Vendor: Apache Software Foundation
 Bundle-ContactAddress: dev-tam...@incubator.apache.org
 Bundle-DocURL: http://tamaya.apache.org
 Bundle-Activator: org.apache.tamaya.core.OSGIActivator
+Bundle-ActivationPolicy: lazy
 Export-Package: \
org.apache.tamaya.core
 Import-Package: \

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f33fb9d0/code/spi-support/bnd.bnd
--
diff --git a/code/spi-support/bnd.bnd b/code/spi-support/bnd.bnd
index 89db115..2dc253a 100644
--- a/code/spi-support/bnd.bnd
+++ b/code/spi-support/bnd.bnd
@@ -10,6 +10,7 @@ javac.source: 1.8
 javac.target: 1.8
 
 Automatic-Module-Name: org.apache.tamaya.spisupport
+Bundle-ActivationPolicy: lazy
 Bundle-Version: ${version}.${tstamp}
 Bundle-Name: Apache Tamaya - SPI Support
 Bundle-SymbolicName: org.apache.tamaya.spisupport