deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject deltaspike git commit: DELTASPIKE-775 typed base-config
Date Sun, 14 Dec 2014 17:50:22 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 60b8bf547 -> 49ea10eec


DELTASPIKE-775 typed base-config


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/49ea10ee
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/49ea10ee
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/49ea10ee

Branch: refs/heads/master
Commit: 49ea10eecccf6d27d9402e70d296975e550f269e
Parents: 60b8bf5
Author: gpetracek <gpetracek@apache.org>
Authored: Sun Dec 14 16:23:08 2014 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Sun Dec 14 18:49:53 2014 +0100

----------------------------------------------------------------------
 .../core/api/config/base/CoreBaseConfig.java    |  49 ++++++
 .../core/api/config/base/TypedConfig.java       | 170 +++++++++++++++++++
 .../core/api/provider/BeanManagerProvider.java  |   5 +-
 .../test/api/config/TestConfigSource.java       |   7 +
 .../test/api/config/typed/TestConfig.java       |  70 ++++++++
 .../test/api/config/typed/TypedConfigTest.java  | 130 ++++++++++++++
 .../interceptor/GlobalInterceptorExtension.java |   5 +-
 .../core/impl/jmx/MBeanExtension.java           |   4 +-
 .../DefaultWindowContextQuotaHandler.java       |   5 +-
 .../jsf/api/config/base/JsfBaseConfig.java      |  61 +++++++
 .../deltaspike/jsf/api/config/view/Folder.java  |   4 +-
 .../deltaspike/jsf/api/config/view/View.java    |   8 +-
 .../jsf/api/literal/FolderLiteral.java          |   4 +-
 .../deltaspike/jsf/api/literal/ViewLiteral.java |   8 +-
 .../scope/window/DefaultClientWindowConfig.java |   6 +-
 .../jsf/impl/util/ClientWindowHelper.java       |   7 +-
 .../deltaspike/jsf/impl/util/JsfUtils.java      |   6 +-
 .../scheduler/impl/CdiAwareJobFactory.java      |   5 +-
 .../scheduler/impl/QuartzScheduler.java         |  18 +-
 .../scheduler/impl/SchedulerBaseConfig.java     |  52 ++++++
 .../scheduler/impl/SchedulerExtension.java      |   4 +-
 .../scheduler/custom/CustomConfigSource.java    |   4 +-
 .../custom/CustomDeactivatedConfigSource.java   |   9 +-
 .../testcontrol/api/junit/CdiTestRunner.java    |   6 +-
 .../api/junit/CdiTestSuiteRunner.java           |   4 +-
 .../testcontrol/api/junit/TestBaseConfig.java   |  44 +++++
 .../impl/jsf/MyFacesContainerAdapter.java       |   2 +-
 .../impl/jsf/MyFacesTestBaseConfig.java         |  27 +++
 .../impl/mock/AbstractMockManager.java          |  12 +-
 .../impl/mock/DefaultMockFilter.java            |   8 +-
 30 files changed, 661 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
new file mode 100644
index 0000000..30a6846
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
@@ -0,0 +1,49 @@
+/*
+ * 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.deltaspike.core.api.config.base;
+
+public interface CoreBaseConfig
+{
+    interface BeanManager
+    {
+        TypedConfig<Boolean> DELEGATE_LOOKUP =
+            new TypedConfig<Boolean>("deltaspike.bean-manager.delegate_lookup", Boolean.TRUE);
+    }
+
+    interface Interceptor
+    {
+        TypedConfig<Integer> PRIORITY =
+            new TypedConfig<Integer>("deltaspike.interceptor.priority", 0);
+    }
+
+    interface MBean
+    {
+        TypedConfig<Boolean> AUTO_UNREGISTER =
+            new TypedConfig<Boolean>("deltaspike.mbean.auto-unregister", Boolean.TRUE);
+    }
+
+    interface Scope
+    {
+        interface Window
+        {
+            TypedConfig<Integer> MAX_COUNT =
+                new TypedConfig<Integer>("deltaspike.scope.window.max-count", 1024);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/TypedConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/TypedConfig.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/TypedConfig.java
new file mode 100644
index 0000000..168e699
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/TypedConfig.java
@@ -0,0 +1,170 @@
+/*
+ * 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.deltaspike.core.api.config.base;
+
+import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.core.util.ClassUtils;
+import org.apache.deltaspike.core.util.ExceptionUtils;
+
+import java.lang.reflect.Method;
+
+public class TypedConfig<T>
+{
+    protected final String key;
+    protected final T defaultValue;
+    protected final Class<? extends T> configEntryType;
+
+    //currently just needed to make this helper more useful for users
+    protected final Object customTypeConverter;
+    protected final Method converterMethod;
+
+    public TypedConfig(String key, T defaultValue)
+    {
+        this(key, defaultValue, null, defaultValue != null ? (Class<T>)defaultValue.getClass() : null);
+    }
+
+    public TypedConfig(String key, T defaultValue, Object customTypeConverter)
+    {
+        this(key, defaultValue, customTypeConverter, defaultValue != null ? (Class<T>)defaultValue.getClass() : null);
+    }
+
+    public TypedConfig(String key, T defaultValue, Class<T> targetType)
+    {
+        this(key, defaultValue, null, targetType);
+    }
+
+    public TypedConfig(String key, T defaultValue, Object customTypeConverter, Class<T> targetType)
+    {
+        if (defaultValue == null && targetType == null)
+        {
+            throw new IllegalArgumentException("'null' isn't supported by this helper for " +
+                "the default-value and target-type");
+        }
+        this.key = key;
+        this.defaultValue = defaultValue;
+        this.configEntryType = getConfigEntryType(targetType, defaultValue);
+
+        this.customTypeConverter = customTypeConverter;
+        this.converterMethod = getCustomTypeConverterMethod(customTypeConverter);
+        validateConfigEntryType();
+    }
+
+    protected Class<? extends T> getConfigEntryType(Class<T> targetType, T defaultValue)
+    {
+        if (targetType != null)
+        {
+            return targetType;
+        }
+        return (Class<? extends T>)defaultValue.getClass();
+    }
+
+    protected Method getCustomTypeConverterMethod(Object customTypeConverter)
+    {
+        Method foundConverterMethod = null;
+        if (customTypeConverter != null)
+        {
+            for (Method currentMethod : customTypeConverter.getClass().getDeclaredMethods())
+            {
+                if (currentMethod.getParameterTypes().length == 1 &&
+                    currentMethod.getParameterTypes()[0].equals(String.class) &&
+                    currentMethod.getReturnType().equals(this.configEntryType))
+                {
+                    foundConverterMethod = currentMethod;
+                    break;
+                }
+            }
+        }
+
+        return foundConverterMethod;
+    }
+
+    protected void validateConfigEntryType()
+    {
+        //same types as supported by DefaultConfigPropertyProducer
+        if (this.converterMethod == null &&
+            !(this.configEntryType.equals(String.class) ||
+                this.configEntryType.equals(Class.class) ||
+                this.configEntryType.equals(Boolean.class) ||
+                this.configEntryType.equals(Integer.class) ||
+                this.configEntryType.equals(Float.class)))
+        {
+            throw new IllegalArgumentException(
+                    this.configEntryType.getName() + " isn't supported out-of-the-box and" +
+                            "no valid (custom) type-converter can be found");
+        }
+    }
+
+    public String getKey()
+    {
+        return key;
+    }
+
+    public T getDefaultValue()
+    {
+        return defaultValue;
+    }
+
+    public T getValue()
+    {
+        String resultString = ConfigResolver.getPropertyValue(
+            this.key, this.defaultValue != null ? this.defaultValue.toString() : null);
+
+        Object result = null;
+
+        if (resultString == null)
+        {
+            return null;
+        }
+
+        //same types as supported by DefaultConfigPropertyProducer
+        else if (String.class.equals(this.configEntryType))
+        {
+            result = resultString;
+        }
+        else if (Class.class.equals(this.configEntryType))
+        {
+            result = ClassUtils.tryToLoadClassForName(resultString);
+        }
+        else if (Boolean.class.equals(this.configEntryType))
+        {
+            result = Boolean.valueOf(resultString);
+        }
+        else if (Integer.class.equals(this.configEntryType))
+        {
+            result = Integer.parseInt(resultString);
+        }
+        else if (Float.class.equals(this.configEntryType))
+        {
+            result = Float.parseFloat(resultString);
+        }
+        else if (this.customTypeConverter != null)
+        {
+            try
+            {
+                result = this.converterMethod.invoke(this.customTypeConverter, resultString);
+            }
+            catch (Exception e)
+            {
+                throw ExceptionUtils.throwAsRuntimeException(e);
+            }
+        }
+
+        return (T)result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/provider/BeanManagerProvider.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/provider/BeanManagerProvider.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/provider/BeanManagerProvider.java
index e349ea9..1ac383e 100644
--- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/provider/BeanManagerProvider.java
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/provider/BeanManagerProvider.java
@@ -32,7 +32,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
 import org.apache.deltaspike.core.util.ClassUtils;
 
 
@@ -76,8 +76,7 @@ public class BeanManagerProvider implements Extension
         Method resolvedCdiBeanManagerMethod = null;
         //only init methods if a cdi 1.1+ container is available and the delegation-mode isn't deactivated.
         //deactivation is e.g. useful if owb is used in "parallel mode" in a weld-based server.
-        if (cdiClass != null && !"false".equalsIgnoreCase(
-            ConfigResolver.getPropertyValue("deltaspike.bean-manager.delegate_lookup", Boolean.TRUE.toString())))
+        if (cdiClass != null && !CoreBaseConfig.BeanManager.DELEGATE_LOOKUP.getValue())
         {
 
             try

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
index 3b073a9..cb6793f 100644
--- a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
+++ b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
@@ -65,6 +65,13 @@ public class TestConfigSource implements ConfigSource
         props.put("testkey4.encrypted", "value");
         props.put("testkey4.password", "mysecretvalue");
 
+        props.put("deltaspike.test.string-value", "configured");
+        props.put("deltaspike.test.integer-value", "5");
+        props.put("deltaspike.test.float-value", "-1.1");
+        props.put("deltaspike.test.boolean-value", Boolean.FALSE.toString());
+        props.put("deltaspike.test.class-value", "org.apache.deltaspike.test.api.config.TestConfigSource");
+        props.put("deltaspike.test.date-value", "" + System.currentTimeMillis());
+        props.put("deltaspike.test.invalid-value", "wrong");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TestConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TestConfig.java b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TestConfig.java
new file mode 100644
index 0000000..9be2b17
--- /dev/null
+++ b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TestConfig.java
@@ -0,0 +1,70 @@
+/*
+ * 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.deltaspike.test.api.config.typed;
+
+import org.apache.deltaspike.core.api.config.base.TypedConfig;
+
+import java.util.Date;
+
+public interface TestConfig
+{
+    interface Valid
+    {
+        TypedConfig<String> STRING_VALUE =
+            new TypedConfig<String>("deltaspike.test.string-value", "default");
+
+        TypedConfig<Integer> INTEGER_VALUE =
+            new TypedConfig<Integer>("deltaspike.test.integer-value", 14);
+
+        TypedConfig<Float> FLOAT_VALUE =
+            new TypedConfig<Float>("deltaspike.test.float-value", 1.1F);
+
+        TypedConfig<Boolean> BOOLEAN_VALUE =
+            new TypedConfig<Boolean>("deltaspike.test.boolean-value", Boolean.TRUE);
+
+        TypedConfig<Class> CLASS_VALUE =
+            new TypedConfig<Class>("deltaspike.test.class-value", TypedConfigTest.class);
+
+        TypedConfig<Date> CUSTOM_TYPE_VALUE =
+            new TypedConfig<Date>("deltaspike.test.date-value", new Date(1983, 4, 14), new DateConverter());
+
+        TypedConfig<Integer> INTEGER_VALUE_NO_DEFAULT =
+            new TypedConfig<Integer>("deltaspike.test.integer-no-default-value", null, Integer.class);
+    }
+
+    interface InvalidConfig
+    {
+        TypedConfig<Integer> CONFIG_WITHOUT_TYPE_INFORMATION =
+            new TypedConfig<Integer>("deltaspike.test.invalid-config", null);
+    }
+
+    interface InvalidConfigValue
+    {
+        TypedConfig<Integer> WRONG_VALUE =
+            new TypedConfig<Integer>("deltaspike.test.invalid-value", 10);
+    }
+
+    static class DateConverter
+    {
+        public Date convert(String value)
+        {
+            return new Date(new Long(value));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TypedConfigTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TypedConfigTest.java b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TypedConfigTest.java
new file mode 100644
index 0000000..3f552fa
--- /dev/null
+++ b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/typed/TypedConfigTest.java
@@ -0,0 +1,130 @@
+/*
+ * 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.deltaspike.test.api.config.typed;
+
+import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
+import org.apache.deltaspike.core.util.ExceptionUtils;
+import org.apache.deltaspike.test.api.config.TestConfigSource;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Date;
+
+public class TypedConfigTest
+{
+    @Test
+    public void testConfiguredDefaultValue()
+    {
+        Integer configuredValue = CoreBaseConfig.Interceptor.PRIORITY.getValue();
+        Assert.assertEquals(new Integer(0), configuredValue);
+
+        Integer defaultValue = CoreBaseConfig.Interceptor.PRIORITY.getDefaultValue();
+        Assert.assertEquals(new Integer(0), defaultValue);
+    }
+
+    @Test
+    public void testStringValue()
+    {
+        String configuredValue = TestConfig.Valid.STRING_VALUE.getValue();
+        Assert.assertEquals("configured", configuredValue);
+
+        String defaultValue = TestConfig.Valid.STRING_VALUE.getDefaultValue();
+        Assert.assertEquals("default", defaultValue);
+    }
+
+    @Test
+    public void testIntegerValue()
+    {
+        Integer configuredValue = TestConfig.Valid.INTEGER_VALUE.getValue();
+        Assert.assertEquals(new Integer(5), configuredValue);
+
+        Integer defaultValue = TestConfig.Valid.INTEGER_VALUE.getDefaultValue();
+        Assert.assertEquals(new Integer(14), defaultValue);
+    }
+
+    @Test
+    public void testFloatValue()
+    {
+        Float configuredValue = TestConfig.Valid.FLOAT_VALUE.getValue();
+        Assert.assertEquals(new Float(-1.1), configuredValue);
+
+        Float defaultValue = TestConfig.Valid.FLOAT_VALUE.getDefaultValue();
+        Assert.assertEquals(new Float(1.1), defaultValue);
+    }
+
+    @Test
+    public void testBooleanValue()
+    {
+        Boolean configuredValue = TestConfig.Valid.BOOLEAN_VALUE.getValue();
+        Assert.assertEquals(Boolean.FALSE, configuredValue);
+
+        Boolean defaultValue = TestConfig.Valid.BOOLEAN_VALUE.getDefaultValue();
+        Assert.assertEquals(Boolean.TRUE, defaultValue);
+    }
+
+    @Test
+    public void testClassValue()
+    {
+        Class configuredValue = TestConfig.Valid.CLASS_VALUE.getValue();
+        Assert.assertEquals(TestConfigSource.class, configuredValue);
+
+        Class defaultValue = TestConfig.Valid.CLASS_VALUE.getDefaultValue();
+        Assert.assertEquals(getClass(), defaultValue);
+    }
+
+    @Test
+    public void testCustomType()
+    {
+        Date configuredValue = TestConfig.Valid.CUSTOM_TYPE_VALUE.getValue();
+        Assert.assertEquals(configuredValue.getYear(), new Date().getYear());
+
+        Date defaultValue = TestConfig.Valid.CUSTOM_TYPE_VALUE.getDefaultValue();
+        Assert.assertEquals(new Date(1983, 4, 14), defaultValue);
+    }
+
+    @Test
+    public void testIntegerValueNoValue()
+    {
+        Integer configuredValue = TestConfig.Valid.INTEGER_VALUE_NO_DEFAULT.getValue();
+        Assert.assertEquals(null, configuredValue);
+
+        Integer defaultValue = TestConfig.Valid.INTEGER_VALUE_NO_DEFAULT.getDefaultValue();
+        Assert.assertEquals(null, defaultValue);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidConfigEntry()
+    {
+        try
+        {
+            TestConfig.InvalidConfig.CONFIG_WITHOUT_TYPE_INFORMATION.getValue();
+        }
+        catch (ExceptionInInitializerError e)
+        {
+            throw ExceptionUtils.throwAsRuntimeException(e.getCause());
+        }
+        Assert.fail();
+    }
+
+    @Test(expected = NumberFormatException.class)
+    public void testWrongConfigValue()
+    {
+        TestConfig.InvalidConfigValue.WRONG_VALUE.getValue();
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
index 9cc2f7a..ddf1cf0 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/GlobalInterceptorExtension.java
@@ -18,7 +18,7 @@
  */
 package org.apache.deltaspike.core.impl.interceptor;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
 import org.apache.deltaspike.core.spi.activation.Deactivatable;
 import org.apache.deltaspike.core.util.ClassDeactivationUtils;
 import org.apache.deltaspike.core.util.ClassUtils;
@@ -58,8 +58,7 @@ public class GlobalInterceptorExtension implements Deactivatable, Extension
             ClassUtils.tryToLoadClassForName("javax.enterprise.inject.spi.AfterTypeDiscovery") != null)
         {
             Map<String, Object> defaultValueMap = new HashMap<String, Object>();
-            int priorityValue = Integer.parseInt(
-                ConfigResolver.getPropertyValue("deltaspike.interceptor.priority", "0"));
+            int priorityValue = CoreBaseConfig.Interceptor.PRIORITY.getValue();
             defaultValueMap.put("value", priorityValue);
             priorityAnnotationInstance = AnnotationInstanceProvider.of(priorityAnnotationClass, defaultValueMap);
         }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/jmx/MBeanExtension.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/jmx/MBeanExtension.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/jmx/MBeanExtension.java
index 48a1a5e..d0006ef 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/jmx/MBeanExtension.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/jmx/MBeanExtension.java
@@ -18,6 +18,7 @@
  */
 package org.apache.deltaspike.core.impl.jmx;
 
+import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
 import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.jmx.JmxBroadcaster;
 import org.apache.deltaspike.core.api.jmx.MBean;
@@ -121,8 +122,7 @@ public class MBeanExtension implements Extension, Deactivatable
         final Annotation[] qualifiers = qualifiers(bean.getAnnotatedBeanClass(), bm);
         final DynamicMBeanWrapper mbean = new DynamicMBeanWrapper(clazz, normalScoped, qualifiers);
         final MBeanServer server = mBeanServer();
-        if (server.isRegistered(objectName)
-                && "true".equals(ConfigResolver.getPropertyValue("deltaspike.mbean.auto-unregister", "true")))
+        if (server.isRegistered(objectName) && CoreBaseConfig.MBean.AUTO_UNREGISTER.getValue())
         {
             server.unregisterMBean(objectName);
         }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DefaultWindowContextQuotaHandler.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DefaultWindowContextQuotaHandler.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DefaultWindowContextQuotaHandler.java
index 3b44094..0ffaba6 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DefaultWindowContextQuotaHandler.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DefaultWindowContextQuotaHandler.java
@@ -18,7 +18,7 @@
  */
 package org.apache.deltaspike.core.impl.scope.window;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
 import org.apache.deltaspike.core.spi.scope.window.WindowContextQuotaHandler;
 
 import javax.annotation.PostConstruct;
@@ -41,8 +41,7 @@ public class DefaultWindowContextQuotaHandler implements WindowContextQuotaHandl
     @PostConstruct
     protected void init()
     {
-        String maxCount = ConfigResolver.getPropertyValue("deltaspike.scope.window.max-count", "" + 1024);
-        this.maxWindowContextCount = Integer.parseInt(maxCount);
+        this.maxWindowContextCount = CoreBaseConfig.Scope.Window.MAX_COUNT.getValue();
     }
 
     public synchronized /*no issue due to session-scoped instance*/ void checkWindowContextQuota(String windowId)

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/base/JsfBaseConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/base/JsfBaseConfig.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/base/JsfBaseConfig.java
new file mode 100644
index 0000000..1b68900
--- /dev/null
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/base/JsfBaseConfig.java
@@ -0,0 +1,61 @@
+/*
+ * 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.deltaspike.jsf.api.config.base;
+
+import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
+import org.apache.deltaspike.core.api.config.base.TypedConfig;
+import org.apache.deltaspike.jsf.api.config.view.Folder;
+import org.apache.deltaspike.jsf.api.config.view.View;
+
+public interface JsfBaseConfig
+{
+    interface ViewConfig
+    {
+        TypedConfig<String> CUSTOM_DEFAULT_BASE_PATH_BUILDER =
+            new TypedConfig<String>(View.DefaultBasePathBuilder.class.getName(), null, String.class);
+
+        TypedConfig<String> CUSTOM_DEFAULT_FILE_NAME_BUILDER =
+            new TypedConfig<String>(View.DefaultFileNameBuilder.class.getName(), null, String.class);
+
+        TypedConfig<String> CUSTOM_DEFAULT_EXTENSION_BUILDER =
+            new TypedConfig<String>(View.DefaultExtensionBuilder.class.getName(), null, String.class);
+
+        TypedConfig<String> CUSTOM_DEFAULT_FOLDER_NAME_BUILDER =
+            new TypedConfig<String>(Folder.DefaultFolderNameBuilder.class.getName(), null, String.class);
+    }
+
+    interface Scope
+    {
+        interface Window
+        {
+            TypedConfig<Integer> MAX_COUNT =
+                new TypedConfig<Integer>(CoreBaseConfig.Scope.Window.MAX_COUNT.getKey(), 64);
+
+            //10 is enough for the integer generated by DefaultClientWindow#generateNewWindowId - see DELTASPIKE-752
+            TypedConfig<Integer> ID_MAX_LENGTH =
+                new TypedConfig<Integer>("deltaspike.window-id.max_length", 10);
+        }
+
+        interface View
+        {
+            TypedConfig<Boolean> DELEGATE_TO_JSF =
+                new TypedConfig<Boolean>("deltaspike.scope.view.delegate", Boolean.TRUE);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
index 8cac6c5..481c732 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
@@ -18,12 +18,12 @@
  */
 package org.apache.deltaspike.jsf.api.config.view;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.config.view.metadata.SkipMetaDataMerge;
 import org.apache.deltaspike.core.api.config.view.metadata.ViewMetaData;
 import org.apache.deltaspike.core.spi.config.view.ConfigPreProcessor;
 import org.apache.deltaspike.core.spi.config.view.ViewConfigNode;
 import org.apache.deltaspike.core.util.ClassUtils;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 import org.apache.deltaspike.jsf.api.literal.FolderLiteral;
 import org.apache.deltaspike.jsf.util.NamingConventionUtils;
 
@@ -114,7 +114,7 @@ public @interface Folder
             if (DefaultFolderNameBuilder.class.equals(folder.folderNameBuilder()))
             {
                 String customDefaultFolderNameBuilderClassName =
-                        ConfigResolver.getPropertyValue(DefaultFolderNameBuilder.class.getName(), null);
+                    JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_FOLDER_NAME_BUILDER.getValue();
 
                 if (customDefaultFolderNameBuilderClassName != null)
                 {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
index 9af192b..848e5c4 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
@@ -18,12 +18,12 @@
  */
 package org.apache.deltaspike.jsf.api.config.view;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.config.view.metadata.SkipMetaDataMerge;
 import org.apache.deltaspike.core.api.config.view.metadata.ViewMetaData;
 import org.apache.deltaspike.core.spi.config.view.ConfigPreProcessor;
 import org.apache.deltaspike.core.spi.config.view.ViewConfigNode;
 import org.apache.deltaspike.core.util.ClassUtils;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 import org.apache.deltaspike.jsf.api.literal.ViewLiteral;
 import org.apache.deltaspike.jsf.util.NamingConventionUtils;
 
@@ -242,7 +242,7 @@ public @interface View
             if (DefaultBasePathBuilder.class.equals(view.basePathBuilder()))
             {
                 String customDefaultBasePathBuilderClassName =
-                        ConfigResolver.getPropertyValue(DefaultBasePathBuilder.class.getName(), null);
+                    JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_BASE_PATH_BUILDER.getValue();
 
                 if (customDefaultBasePathBuilderClassName != null)
                 {
@@ -267,7 +267,7 @@ public @interface View
             if (DefaultFileNameBuilder.class.equals(view.fileNameBuilder()))
             {
                 String customDefaultFileNameBuilderClassName =
-                        ConfigResolver.getPropertyValue(DefaultFileNameBuilder.class.getName(), null);
+                    JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_FILE_NAME_BUILDER.getValue();
 
                 if (customDefaultFileNameBuilderClassName != null)
                 {
@@ -292,7 +292,7 @@ public @interface View
             if (DefaultExtensionBuilder.class.equals(view.extensionBuilder()))
             {
                 String customDefaultExtensionBuilderClassName =
-                        ConfigResolver.getPropertyValue(DefaultExtensionBuilder.class.getName(), null);
+                    JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_EXTENSION_BUILDER.getValue();
 
                 if (customDefaultExtensionBuilderClassName != null)
                 {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/FolderLiteral.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/FolderLiteral.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/FolderLiteral.java
index 74c3f3f..ebd8a92 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/FolderLiteral.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/FolderLiteral.java
@@ -19,8 +19,8 @@
 
 package org.apache.deltaspike.jsf.api.literal;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.util.ClassUtils;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 import org.apache.deltaspike.jsf.api.config.view.Folder;
 
 import javax.enterprise.util.AnnotationLiteral;
@@ -48,7 +48,7 @@ public class FolderLiteral extends AnnotationLiteral<Folder> implements Folder
         }
 
         final String customDefaultFolderNameBuilderClassName =
-                ConfigResolver.getPropertyValue(Folder.DefaultFolderNameBuilder.class.getName(), null);
+            JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_FOLDER_NAME_BUILDER.getValue();
 
         if (customDefaultFolderNameBuilderClassName != null)
         {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewLiteral.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewLiteral.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewLiteral.java
index 21b45b4..3cfa269 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewLiteral.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewLiteral.java
@@ -19,8 +19,8 @@
 
 package org.apache.deltaspike.jsf.api.literal;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.util.ClassUtils;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 import org.apache.deltaspike.jsf.api.config.view.View;
 
 import javax.enterprise.util.AnnotationLiteral;
@@ -63,7 +63,7 @@ public class ViewLiteral extends AnnotationLiteral<View> implements View
         }
 
         final String customDefaultBasePathBuilderClassName =
-                ConfigResolver.getPropertyValue(DefaultBasePathBuilder.class.getName(), null);
+            JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_BASE_PATH_BUILDER.getValue();
 
         if (customDefaultBasePathBuilderClassName != null)
         {
@@ -76,7 +76,7 @@ public class ViewLiteral extends AnnotationLiteral<View> implements View
 
 
         final String customDefaultFileNameBuilderClassName =
-                ConfigResolver.getPropertyValue(DefaultFileNameBuilder.class.getName(), null);
+            JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_FILE_NAME_BUILDER.getValue();
 
         if (customDefaultFileNameBuilderClassName != null)
         {
@@ -89,7 +89,7 @@ public class ViewLiteral extends AnnotationLiteral<View> implements View
 
 
         final String customDefaultExtensionBuilderClassName =
-                ConfigResolver.getPropertyValue(DefaultExtensionBuilder.class.getName(), null);
+            JsfBaseConfig.ViewConfig.CUSTOM_DEFAULT_EXTENSION_BUILDER.getValue();
 
         if (customDefaultExtensionBuilderClassName != null)
         {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowConfig.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowConfig.java
index f647e49..325bd06 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowConfig.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowConfig.java
@@ -27,11 +27,11 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Map;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.projectstage.ProjectStage;
 import org.apache.deltaspike.core.util.ClassUtils;
 import org.apache.deltaspike.core.util.ExceptionUtils;
 import org.apache.deltaspike.jsf.api.config.JsfModuleConfig;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 
 /**
  * <p>Default implementation of {@link ClientWindowConfig}.
@@ -81,9 +81,7 @@ public class DefaultClientWindowConfig implements ClientWindowConfig
     protected void init()
     {
         this.defaultClientWindowRenderMode = this.jsfModuleConfig.getDefaultWindowMode();
-
-        String maxCount = ConfigResolver.getPropertyValue("deltaspike.scope.window.max-count", "" + 64);
-        this.maxWindowContextCount = Integer.parseInt(maxCount);
+        this.maxWindowContextCount = JsfBaseConfig.Scope.Window.MAX_COUNT.getValue();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ClientWindowHelper.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ClientWindowHelper.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ClientWindowHelper.java
index 927cb38..7025e0c 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ClientWindowHelper.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ClientWindowHelper.java
@@ -31,7 +31,7 @@ import javax.faces.context.FacesContext;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 import org.apache.deltaspike.jsf.spi.scope.window.ClientWindow;
 
 @Typed()
@@ -163,10 +163,9 @@ public abstract class ClientWindowHelper
 
     public static int getMaxWindowIdLength()
     {
-        //10 is enough for the integer generated by DefaultClientWindow#generateNewWindowId - see DELTASPIKE-752
-        int result = Integer.parseInt(ConfigResolver.getPropertyValue("deltaspike.window-id.max_length", "" + 10));
+        int result = JsfBaseConfig.Scope.Window.ID_MAX_LENGTH.getValue();
 
-        if (result > 10)
+        if (result > JsfBaseConfig.Scope.Window.ID_MAX_LENGTH.getDefaultValue())
         {
             if (LOG.isLoggable(Level.WARNING))
             {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/JsfUtils.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/JsfUtils.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/JsfUtils.java
index 1bf2ff0..0cfb85e 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/JsfUtils.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/JsfUtils.java
@@ -18,11 +18,11 @@
  */
 package org.apache.deltaspike.jsf.impl.util;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver;
 import org.apache.deltaspike.core.api.provider.BeanProvider;
 import org.apache.deltaspike.core.api.config.view.navigation.NavigationParameterContext;
 import org.apache.deltaspike.core.util.ClassUtils;
+import org.apache.deltaspike.jsf.api.config.base.JsfBaseConfig;
 import org.apache.deltaspike.jsf.api.config.JsfModuleConfig;
 import org.apache.deltaspike.jsf.impl.listener.phase.WindowMetaData;
 import org.apache.deltaspike.jsf.impl.message.FacesMessageEntry;
@@ -361,8 +361,8 @@ public abstract class JsfUtils
      */
     public static boolean isViewScopeDelegationEnabled()
     {
-        return ClassUtils.tryToLoadClassForName("javax.faces.view.ViewScoped") != null && !"false".equalsIgnoreCase(
-            ConfigResolver.getPropertyValue("deltaspike.scope.view.delegate", Boolean.TRUE.toString()));
+        return ClassUtils.tryToLoadClassForName("javax.faces.view.ViewScoped") != null &&
+            JsfBaseConfig.Scope.View.DELEGATE_TO_JSF.getValue();
     }
 
     public static void logWrongModuleUsage(String name)

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/CdiAwareJobFactory.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/CdiAwareJobFactory.java b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/CdiAwareJobFactory.java
index 9268a76..5aaa8ee 100644
--- a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/CdiAwareJobFactory.java
+++ b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/CdiAwareJobFactory.java
@@ -18,7 +18,6 @@
  */
 package org.apache.deltaspike.scheduler.impl;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.provider.BeanProvider;
 import org.apache.deltaspike.core.util.ClassUtils;
 import org.quartz.Job;
@@ -33,9 +32,7 @@ public class CdiAwareJobFactory implements JobFactory
 
     public CdiAwareJobFactory()
     {
-        String defaultJobFactoryName =
-            ConfigResolver.getPropertyValue("deltaspike.scheduler.DefaultJobFactory",
-                "org.quartz.simpl.PropertySettingJobFactory");
+        String defaultJobFactoryName = SchedulerBaseConfig.Job.DEFAULT_JOB_FACTORY_CLASS_NAME.getValue();
 
         defaultFactory = ClassUtils.tryToInstantiateClassForName(defaultJobFactoryName, JobFactory.class);
     }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java
index 72dabb9..b1d76ad 100644
--- a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java
+++ b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java
@@ -19,7 +19,6 @@
 package org.apache.deltaspike.scheduler.impl;
 
 import org.apache.deltaspike.cdise.api.ContextControl;
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.provider.BeanProvider;
 import org.apache.deltaspike.core.util.ClassUtils;
 import org.apache.deltaspike.core.util.ExceptionUtils;
@@ -56,8 +55,6 @@ import java.util.logging.Logger;
 //vetoed class (see SchedulerExtension)
 public class QuartzScheduler implements Scheduler<Job>
 {
-    public static final String START_SCOPES_KEY = "deltaspike.scheduler.start_scopes_for_jobs";
-
     private static final Logger LOG = Logger.getLogger(QuartzScheduler.class.getName());
     private static final Scheduled DEFAULT_SCHEDULED_LITERAL = AnnotationInstanceProvider.of(Scheduled.class);
 
@@ -128,17 +125,13 @@ public class QuartzScheduler implements Scheduler<Job>
         try
         {
             this.scheduler = schedulerFactory.getScheduler();
-            final String startScopes = ConfigResolver
-                    .getPropertyValue(START_SCOPES_KEY, "true");
-            if ("true".equalsIgnoreCase(startScopes))
+            if (SchedulerBaseConfig.Lifecycle.START_SCOPES_PER_JOB.getValue())
             {
                 this.scheduler.getListenerManager().addJobListener(new InjectionAwareJobListener());
             }
             if (!this.scheduler.isStarted())
             {
-                String delayedStart =
-                    ConfigResolver.getPropertyValue("deltaspike.scheduler.delayed_start_in_seconds", "1");
-                this.scheduler.startDelayed(Integer.parseInt(delayedStart));
+                this.scheduler.startDelayed(SchedulerBaseConfig.Lifecycle.DELAYED_START_IN_SECONDS.getValue());
             }
         }
         catch (SchedulerException e)
@@ -150,8 +143,7 @@ public class QuartzScheduler implements Scheduler<Job>
     protected ResourceBundle loadCustomQuartzConfig()
     {
         //don't use quartz.properties as default-value
-        String configFile =
-            ConfigResolver.getPropertyValue("deltaspike.scheduler.quartz_config-file", "quartz");
+        String configFile = SchedulerBaseConfig.SCHEDULER_CONFIG_FILE.getValue();
         return PropertyFileUtils.getResourceBundle(configFile);
     }
 
@@ -162,9 +154,7 @@ public class QuartzScheduler implements Scheduler<Job>
         {
             if (this.scheduler != null && this.scheduler.isStarted())
             {
-                String forceStop = ConfigResolver.getPropertyValue("deltaspike.scheduler.force_stop", "true");
-
-                this.scheduler.shutdown(Boolean.parseBoolean(forceStop));
+                this.scheduler.shutdown(SchedulerBaseConfig.Lifecycle.FORCE_STOP.getValue());
                 this.scheduler = null;
             }
         }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerBaseConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerBaseConfig.java b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerBaseConfig.java
new file mode 100644
index 0000000..9df4575
--- /dev/null
+++ b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerBaseConfig.java
@@ -0,0 +1,52 @@
+/*
+ * 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.deltaspike.scheduler.impl;
+
+import org.apache.deltaspike.core.api.config.base.TypedConfig;
+
+//keep it in the impl. module for now, because it's mainly quartz specific config
+public interface SchedulerBaseConfig
+{
+    interface Job
+    {
+        //don't type it to class to keep quartz optional
+        TypedConfig<String> DEFAULT_JOB_FACTORY_CLASS_NAME =
+            new TypedConfig<String>("deltaspike.scheduler.DefaultJobFactory",
+                "org.quartz.simpl.PropertySettingJobFactory");
+
+        //don't type it to class to keep quartz optional
+        TypedConfig<String> JOB_CLASS_NAME =
+            new TypedConfig<String>("deltaspike.scheduler.job-class", "org.quartz.Job");
+    }
+
+    TypedConfig<String> SCHEDULER_CONFIG_FILE =
+        new TypedConfig<String>("deltaspike.scheduler.quartz_config-file", "quartz");
+
+    interface Lifecycle
+    {
+        TypedConfig<Boolean> START_SCOPES_PER_JOB =
+                new TypedConfig<Boolean>("deltaspike.scheduler.start_scopes_for_jobs", Boolean.TRUE);
+
+        TypedConfig<Boolean> FORCE_STOP =
+                new TypedConfig<Boolean>("deltaspike.scheduler.force_stop", Boolean.TRUE);
+
+        TypedConfig<Integer> DELAYED_START_IN_SECONDS =
+                new TypedConfig<Integer>("deltaspike.scheduler.delayed_start_in_seconds", 1);
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java
index 2986810..27f7b33 100644
--- a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java
+++ b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java
@@ -18,7 +18,6 @@
  */
 package org.apache.deltaspike.scheduler.impl;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.spi.activation.Deactivatable;
 import org.apache.deltaspike.core.util.ClassDeactivationUtils;
 import org.apache.deltaspike.core.util.ClassUtils;
@@ -41,7 +40,6 @@ import java.util.logging.Logger;
 
 public class SchedulerExtension implements Extension, Deactivatable
 {
-    public static final String JOB_CLASS_CONFIG_KEY = "deltaspike.scheduler.job-class";
     private static final Logger LOG = Logger.getLogger(SchedulerExtension.class.getName());
 
     private Boolean isActivated = true;
@@ -58,7 +56,7 @@ public class SchedulerExtension implements Extension, Deactivatable
 
         if (this.isActivated)
         {
-            String jobClassName = ConfigResolver.getPropertyValue(JOB_CLASS_CONFIG_KEY, "org.quartz.Job");
+            String jobClassName = SchedulerBaseConfig.Job.JOB_CLASS_NAME.getValue();
 
             this.jobClass = ClassUtils.tryToLoadClassForName(jobClassName);
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomConfigSource.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomConfigSource.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomConfigSource.java
index 7664959..b8dada0 100644
--- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomConfigSource.java
+++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomConfigSource.java
@@ -20,7 +20,7 @@ package org.apache.deltaspike.test.scheduler.custom;
 
 import org.apache.deltaspike.core.spi.activation.ClassDeactivator;
 import org.apache.deltaspike.core.spi.config.ConfigSource;
-import org.apache.deltaspike.scheduler.impl.SchedulerExtension;
+import org.apache.deltaspike.scheduler.impl.SchedulerBaseConfig;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -29,7 +29,7 @@ public class CustomConfigSource implements ConfigSource
 {
     private Map<String, String> config = new HashMap<String, String>()
     {{
-        put(SchedulerExtension.JOB_CLASS_CONFIG_KEY, CustomJob.class.getName());
+        put(SchedulerBaseConfig.Job.JOB_CLASS_NAME.getKey(), CustomJob.class.getName());
         put(ClassDeactivator.class.getName(), QuartzDeactivator.class.getName());
     }};
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomDeactivatedConfigSource.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomDeactivatedConfigSource.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomDeactivatedConfigSource.java
index ce9d342..3b336b0 100644
--- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomDeactivatedConfigSource.java
+++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomDeactivatedConfigSource.java
@@ -20,8 +20,7 @@ package org.apache.deltaspike.test.scheduler.custom;
 
 import org.apache.deltaspike.core.spi.activation.ClassDeactivator;
 import org.apache.deltaspike.core.spi.config.ConfigSource;
-import org.apache.deltaspike.scheduler.impl.QuartzScheduler;
-import org.apache.deltaspike.scheduler.impl.SchedulerExtension;
+import org.apache.deltaspike.scheduler.impl.SchedulerBaseConfig;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -30,10 +29,10 @@ public class CustomDeactivatedConfigSource implements ConfigSource
 {
     private Map<String, String> config = new HashMap<String, String>()
     {{
-            put(SchedulerExtension.JOB_CLASS_CONFIG_KEY, CustomJob.class.getName());
-            put(QuartzScheduler.START_SCOPES_KEY,"false");
+            put(SchedulerBaseConfig.Job.JOB_CLASS_NAME.getKey(), CustomJob.class.getName());
+            put(SchedulerBaseConfig.Lifecycle.START_SCOPES_PER_JOB.getKey(), Boolean.FALSE.toString());
             put(ClassDeactivator.class.getName(), QuartzDeactivator.class.getName());
-        }};
+    }};
 
     @Override
     public int getOrdinal()

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
index 2287810..48525e3 100644
--- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
+++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
@@ -22,7 +22,6 @@ import junit.framework.Assert;
 import org.apache.deltaspike.cdise.api.CdiContainer;
 import org.apache.deltaspike.cdise.api.CdiContainerLoader;
 import org.apache.deltaspike.cdise.api.ContextControl;
-import org.apache.deltaspike.core.api.config.ConfigResolver;
 import org.apache.deltaspike.core.api.projectstage.ProjectStage;
 import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
 import org.apache.deltaspike.core.api.provider.BeanProvider;
@@ -83,10 +82,7 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner
 
     static
     {
-        //default is false to improve the compatibility with @Before and @After
-        String useTestClassAsCdiBeanValue =
-                ConfigResolver.getPropertyValue("deltaspike.testcontrol.use_test_class_as_cdi_bean", "false");
-        USE_TEST_CLASS_AS_CDI_BEAN = Boolean.parseBoolean(useTestClassAsCdiBeanValue);
+        USE_TEST_CLASS_AS_CDI_BEAN = TestBaseConfig.Container.USE_TEST_CLASS_AS_CDI_BEAN.getValue();
     }
 
     private static ThreadLocal<Boolean> automaticScopeHandlingActive = new ThreadLocal<Boolean>();

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
index c36dea7..c7e7d8e 100644
--- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
+++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
@@ -63,9 +63,7 @@ public class CdiTestSuiteRunner extends Suite
 
     static
     {
-        String stopContainerConfigValue =
-                ConfigResolver.getPropertyValue("deltaspike.testcontrol.stop_container", "true");
-        STOP_CONTAINER = Boolean.parseBoolean(stopContainerConfigValue.trim());
+        STOP_CONTAINER = TestBaseConfig.Container.STOP_CONTAINER.getValue();
     }
 
     public CdiTestSuiteRunner(Class<?> klass, RunnerBuilder builder) throws InitializationError

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/TestBaseConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/TestBaseConfig.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/TestBaseConfig.java
new file mode 100644
index 0000000..482f7b5
--- /dev/null
+++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/TestBaseConfig.java
@@ -0,0 +1,44 @@
+/*
+ * 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.deltaspike.testcontrol.api.junit;
+
+import org.apache.deltaspike.core.api.config.base.TypedConfig;
+
+public interface TestBaseConfig
+{
+    interface Container
+    {
+        //default is false to improve the compatibility with @Before and @After
+        TypedConfig<Boolean> USE_TEST_CLASS_AS_CDI_BEAN =
+            new TypedConfig<Boolean>("deltaspike.testcontrol.use_test_class_as_cdi_bean", Boolean.FALSE);
+
+        TypedConfig<Boolean> STOP_CONTAINER =
+            new TypedConfig<Boolean>("deltaspike.testcontrol.stop_container", Boolean.TRUE);
+    }
+
+    interface Mock
+    {
+        TypedConfig<Boolean> ALLOW_MOCKED_BEANS =
+                new TypedConfig<Boolean>("deltaspike.testcontrol.mock-support.allow_mocked_beans", Boolean.FALSE);
+
+        TypedConfig<Boolean> ALLOW_MOCKED_PRODUCERS =
+                new TypedConfig<Boolean>("deltaspike.testcontrol.mock-support.allow_mocked_producers", Boolean.FALSE);
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesContainerAdapter.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesContainerAdapter.java b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesContainerAdapter.java
index 315fecf..4ffe785 100644
--- a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesContainerAdapter.java
+++ b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesContainerAdapter.java
@@ -60,7 +60,7 @@ public class MyFacesContainerAdapter implements TestAware, ExternalContainer
                 if (testConfig == null || DEFAULT_TEST_CONFIG_LITERAL.webappResourcePath().equals(
                     testConfig.webappResourcePath()))
                 {
-                    return ConfigResolver.getPropertyValue("deltaspike.testcontrol.mf.test.webapp_resource_path", "");
+                    return MyFacesTestBaseConfig.WEBAPP_RESOURCE_PATH.getValue();
                 }
                 return testConfig.webappResourcePath();
             }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesTestBaseConfig.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesTestBaseConfig.java b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesTestBaseConfig.java
new file mode 100644
index 0000000..457f8d0
--- /dev/null
+++ b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFacesTestBaseConfig.java
@@ -0,0 +1,27 @@
+/*
+ * 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.deltaspike.testcontrol.impl.jsf;
+
+import org.apache.deltaspike.core.api.config.base.TypedConfig;
+
+public interface MyFacesTestBaseConfig
+{
+    TypedConfig<String> WEBAPP_RESOURCE_PATH =
+        new TypedConfig<String>("deltaspike.testcontrol.mf.test.webapp_resource_path", "");
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/AbstractMockManager.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/AbstractMockManager.java b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/AbstractMockManager.java
index 24a9f84..898177c 100644
--- a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/AbstractMockManager.java
+++ b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/AbstractMockManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.deltaspike.testcontrol.impl.mock;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.testcontrol.api.junit.TestBaseConfig;
 import org.apache.deltaspike.testcontrol.api.mock.DynamicMockManager;
 import org.apache.deltaspike.testcontrol.api.mock.TypedMock;
 
@@ -35,15 +35,13 @@ public abstract class AbstractMockManager implements DynamicMockManager
     public void addMock(Object mockInstance, Annotation... qualifiers)
     {
         //check if this method gets used without changing the default-config
-        if (!Boolean.parseBoolean(ConfigResolver.getPropertyValue(
-            "deltaspike.testcontrol.mock-support.allow_mocked_beans", Boolean.FALSE.toString())) &&
-                !Boolean.parseBoolean(ConfigResolver.getPropertyValue(
-                    "deltaspike.testcontrol.mock-support.allow_mocked_producers", Boolean.FALSE.toString())))
+        if (!TestBaseConfig.Mock.ALLOW_MOCKED_BEANS.getValue() &&
+            !TestBaseConfig.Mock.ALLOW_MOCKED_PRODUCERS.getValue())
         {
             throw new IllegalStateException("The support for mocked CDI-Beans is disabled " +
                 "due to a reduced portability across different CDI-implementations. " +
-                "Please set 'deltaspike.testcontrol.mock-support.allow_mocked_beans' and/or " +
-                "'deltaspike.testcontrol.mock-support.allow_mocked_producers' to 'true' " +
+                "Please set '" + TestBaseConfig.Mock.ALLOW_MOCKED_BEANS.getKey() + "' and/or '" +
+                TestBaseConfig.Mock.ALLOW_MOCKED_PRODUCERS.getKey() + "' to 'true' " +
                 "(in 'META-INF/apache-deltaspike.properties') on your test-classpath.");
         }
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/49ea10ee/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/DefaultMockFilter.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/DefaultMockFilter.java b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/DefaultMockFilter.java
index 30ca751..76d7e8b 100644
--- a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/DefaultMockFilter.java
+++ b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/mock/DefaultMockFilter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.deltaspike.testcontrol.impl.mock;
 
-import org.apache.deltaspike.core.api.config.ConfigResolver;
+import org.apache.deltaspike.testcontrol.api.junit.TestBaseConfig;
 import org.apache.deltaspike.testcontrol.spi.mock.MockFilter;
 
 import javax.enterprise.inject.Produces;
@@ -91,13 +91,11 @@ public class DefaultMockFilter implements MockFilter
         if ((annotated instanceof AnnotatedMethod || annotated instanceof AnnotatedField) &&
                 annotated.getAnnotation(Produces.class) != null)
         {
-            return Boolean.parseBoolean(ConfigResolver.getPropertyValue(
-                "deltaspike.testcontrol.mock-support.allow_mocked_producers", Boolean.FALSE.toString()));
+            return TestBaseConfig.Mock.ALLOW_MOCKED_PRODUCERS.getValue();
         }
         else
         {
-            return Boolean.parseBoolean(ConfigResolver.getPropertyValue(
-                "deltaspike.testcontrol.mock-support.allow_mocked_beans", Boolean.FALSE.toString()));
+            return TestBaseConfig.Mock.ALLOW_MOCKED_BEANS.getValue();
         }
     }
 


Mime
View raw message