myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r957073 [2/3] - in /myfaces/extensions/validator/branches/branch_for_extval-100: component-support/generic-support/src/main/java/org/apache/myfaces/extensions/validator/generic/renderkit/ component-support/trinidad-support/src/main/java/org...
Date Tue, 22 Jun 2010 23:04:21 GMT
Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKit.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKit.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKit.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKit.java Tue Jun 22 23:04:19 2010
@@ -68,8 +68,6 @@ public class ExtValRenderKit extends Ren
             return renderer instanceof ExtValRendererWrapper ? renderer : createWrapper(renderer);
         }
 
-        this.logger.finest("no renderer found for family " + family + " and type " + rendererType);
-
         return renderer;
     }
 

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKitFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKitFactory.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKitFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRenderKitFactory.java Tue Jun 22 23:04:19 2010
@@ -21,7 +21,7 @@ package org.apache.myfaces.extensions.va
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.factory.FactoryNames;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
@@ -99,7 +99,7 @@ public class ExtValRenderKitFactory exte
 
             if(this.defaultRenderKitWrapperFactory.isApplicationInitialized())
             {
-                this.isDeactivated = isRenderKitFactoryDeactivatedViaWebXml();
+                this.isDeactivated = isRenderKitFactoryDeactivated();
             }
             else
             {
@@ -149,9 +149,9 @@ public class ExtValRenderKitFactory exte
         return this.wrapped.getRenderKitIds();
     }
 
-    private boolean isRenderKitFactoryDeactivatedViaWebXml()
+    private boolean isRenderKitFactoryDeactivated()
     {
-        return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_RENDER_KIT_FACTORY);
+        return ExtValCoreConfiguration.get().deactivateRenderKitFactory();
     }
 
     private boolean isRenderKitFactoryDeactivatedViaVMParameter()

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererWrapper.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererWrapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/renderkit/ExtValRendererWrapper.java Tue Jun 22 23:04:19 2010
@@ -22,10 +22,10 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.core.interceptor.RendererInterceptor;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.renderkit.exception.SkipBeforeInterceptorsException;
 import org.apache.myfaces.extensions.validator.core.renderkit.exception.SkipAfterInterceptorsException;
 import org.apache.myfaces.extensions.validator.core.renderkit.exception.SkipRendererDelegationException;
-import org.apache.myfaces.extensions.validator.util.ClassUtils;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -59,19 +59,9 @@ public class ExtValRendererWrapper exten
 
     public ExtValRendererWrapper(Renderer renderer)
     {
-        String proxyClassName = (String)ExtValContext.getContext().getGlobalProperty(ExtValRendererProxy.KEY);
+        Class<? extends ExtValRendererProxy> proxyClass = ExtValCoreConfiguration.get().rendererProxy();
 
-        if(proxyClassName == null)
-        {
-            logger.finest("no extval renderer proxy configured");
-
-            this.wrapped = new ExtValLazyRendererProxy(renderer);
-            return;
-        }
-
-        Class targetClass = ClassUtils.tryToLoadClassForName(proxyClassName);
-
-        if(targetClass == null)
+        if(proxyClass == null)
         {
             logger.finest("no extval renderer proxy configured");
 
@@ -84,7 +74,7 @@ public class ExtValRendererWrapper exten
 
         try
         {
-            Constructor constructor = targetClass.getConstructor(argClasses);
+            Constructor constructor = proxyClass.getConstructor(argClasses);
             this.wrapped = (Renderer)constructor.newInstance(renderer);
         }
         catch (Throwable t)

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/AbstractStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/AbstractStartupListener.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/AbstractStartupListener.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/AbstractStartupListener.java Tue Jun 22 23:04:19 2010
@@ -25,7 +25,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.ProjectStageResolver;
-import org.apache.myfaces.extensions.validator.core.DefaultProjectStageResolver;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 
 import javax.faces.event.PhaseEvent;
 import javax.faces.event.PhaseId;
@@ -76,6 +76,8 @@ public abstract class AbstractStartupLis
                     {
                         if(!isStartupListenerDeactivated())
                         {
+                            initModuleConfig();
+
                             initProjectStageResolver();
 
                             init();
@@ -109,6 +111,11 @@ public abstract class AbstractStartupLis
         }
     }
 
+    protected void initModuleConfig()
+    {
+        //override if needed
+    }
+
     public PhaseId getPhaseId()
     {
         return PhaseId.RESTORE_VIEW;
@@ -132,7 +139,7 @@ public abstract class AbstractStartupLis
 
     protected ProjectStageResolver getProjectStageResolver()
     {
-        return new DefaultProjectStageResolver();
+        return ExtValCoreConfiguration.get().projectStageResolver();
     }
 
     protected abstract void init();

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/startup/ExtValStartupListener.java Tue Jun 22 23:04:19 2010
@@ -26,7 +26,8 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.interceptor.FacesMessagePropertyValidationInterceptor;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
+import org.apache.myfaces.extensions.validator.core.DefaultExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.PhaseIdRecordingPhaseListener;
 import org.apache.myfaces.extensions.validator.core.metadata.transformer.mapper
         .BeanValidationStrategyToMetaDataTransformerNameMapper;
@@ -61,10 +62,6 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultViolationSeverityInterpreter;
 import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
 import org.apache.myfaces.extensions.validator.core.validation.parameter.DisableClientSideValidation;
-import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
-import org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 import org.apache.myfaces.extensions.validator.util.JsfUtils;
@@ -79,6 +76,11 @@ public class ExtValStartupListener exten
 {
     private static final long serialVersionUID = -2504826421086572012L;
 
+    protected void initModuleConfig()
+    {
+        ExtValCoreConfiguration.use(new DefaultExtValCoreConfiguration(), false);
+    }
+
     protected void init()
     {
         if(ExtValInformation.VERSION != null)
@@ -100,15 +102,13 @@ public class ExtValStartupListener exten
         initViolationSeverityKey();
         initDisableClientSideValidationKey();
         initRequiredInitialization();
-        initDefaultConstraintSourceAnnotations();
 
         executeCustomStartupListener();
     }
 
     private void initNameMappers()
     {
-        String deactivateDefaultNameMappers = WebXmlParameter.DEACTIVATE_DEFAULT_NAME_MAPPERS;
-        if ((deactivateDefaultNameMappers != null && deactivateDefaultNameMappers.equalsIgnoreCase("true")))
+        if (ExtValCoreConfiguration.get().deactivateDefaultNameMappers())
         {
             return;
         }
@@ -201,50 +201,45 @@ public class ExtValStartupListener exten
         JsfUtils.registerPhaseListener(new PhaseIdRecordingPhaseListener());
     }
 
+    @Deprecated
     private void initViolationSeverityKey()
     {
-        ExtValContext.getContext().addGlobalProperty(ViolationSeverity.class.getName(), ViolationSeverity.class, false);
+        ExtValContext.getContext().addGlobalProperty(ViolationSeverity.class.getName(),
+                ExtValCoreConfiguration.get().violationSeverity(), false);
     }
 
+    @Deprecated
     private void initDisableClientSideValidationKey()
     {
-        ExtValContext.getContext().addGlobalProperty(
-                DisableClientSideValidation.class.getName(), DisableClientSideValidation.class, false);
+        ExtValContext.getContext().addGlobalProperty(DisableClientSideValidation.class.getName(),
+                ExtValCoreConfiguration.get().disableClientSideValidationValidationParameter(), false);
     }
 
     private void initRequiredInitialization()
     {
-        if(WebXmlParameter.ACTIVATE_REQUIRED_INITIALIZATION != null)
-        {
-            boolean requiredInitialization = "true".equalsIgnoreCase(WebXmlParameter.ACTIVATE_REQUIRED_INITIALIZATION);
+        boolean requiredInitialization = ExtValCoreConfiguration.get().activateRequiredInitialization();
 
-            ExtValContext.getContext().addGlobalProperty("mode:init:required", requiredInitialization, false);
+        //noinspection deprecation
+        addRequiredInitializationAsGlobalProperty(requiredInitialization);
 
-            if(requiredInitialization)
-            {
-                deactivateRequiredAttributeSupport();
-            }
-        }
+        initRequiredAttributeSupport();
     }
 
-    private void initDefaultConstraintSourceAnnotations()
+    @Deprecated
+    private void addRequiredInitializationAsGlobalProperty(boolean requiredInitialization)
     {
-        ExtValContext.getContext()
-                .addGlobalProperty(ConstraintSource.class.getName(), ConstraintSource.class, false);
-        ExtValContext.getContext()
-                .addGlobalProperty(IgnoreConstraintSource.class.getName(), IgnoreConstraintSource.class, false);
-        ExtValContext.getContext()
-                .addGlobalProperty(TargetProperty.class.getName(), TargetProperty.class, false);
-        ExtValContext.getContext()
-                .addGlobalProperty(TargetPropertyId.class.getName(), TargetPropertyId.class, false);
+        ExtValContext.getContext().addGlobalProperty("mode:init:required", requiredInitialization, false);
     }
 
     /**
      * if it's configured that required init should happen,
      * it's required to deactivate the support for the required attribute
      */
-    private void deactivateRequiredAttributeSupport()
+    @Deprecated
+    private void initRequiredAttributeSupport()
     {
-        ExtValContext.getContext().addGlobalProperty("mode:reset:required", Boolean.TRUE, false);
+        ExtValContext.getContext().addGlobalProperty("mode:reset:required",
+                ExtValCoreConfiguration.get().deactivateRequiredAttributeSupport(),
+                false);
     }
 }

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractApplicationScopeAwareStorageManager.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractApplicationScopeAwareStorageManager.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractApplicationScopeAwareStorageManager.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractApplicationScopeAwareStorageManager.java Tue Jun 22 23:04:19 2010
@@ -23,7 +23,7 @@ import static org.apache.myfaces.extensi
 
 import javax.faces.context.FacesContext;
 import java.util.Map;
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * generic storage manager implementation which stores the storage implementations in the application scope
@@ -41,8 +41,12 @@ public abstract class AbstractApplicatio
 
         if(!applicationMap.containsKey(getStorageManagerKey()))
         {
-            storageMap = new HashMap<String, T>();
-            applicationMap.put(getStorageManagerKey(), storageMap);
+            storageMap = new ConcurrentHashMap<String, T>();
+
+            synchronized (applicationMap)
+            {
+                applicationMap.put(getStorageManagerKey(), storageMap);
+            }
         }
 
         return (Map<String, T>)applicationMap.get(getStorageManagerKey());

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/AbstractStorageManager.java Tue Jun 22 23:04:19 2010
@@ -79,14 +79,17 @@ public abstract class AbstractStorageMan
 
         if(!storageMap.containsKey(storageKey))
         {
-            storageMap.put(storageKey, (T)ClassUtils.tryToInstantiateClassForName(storageClassName));
+            synchronized (storageMap)
+            {
+                storageMap.put(storageKey, (T)ClassUtils.tryToInstantiateClassForName(storageClassName));
+            }
         }
         return storageMap.get(storageKey);
     }
 
     protected abstract Map<String, T> resolveStorageMap();
 
-    public void reset(String storageKey)
+    public synchronized void reset(String storageKey)
     {
         Map<String, T> storageMap = resolveStorageMap();
 

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMappedConstraintSourceStorage.java Tue Jun 22 23:04:19 2010
@@ -22,10 +22,11 @@ import org.apache.myfaces.extensions.val
 import static org.apache.myfaces.extensions.validator.internal.UsageCategory.INTERNAL;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+import org.apache.myfaces.extensions.validator.util.NullValueAwareConcurrentHashMap;
 
-import java.util.HashMap;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Logger;
 
 /**
@@ -38,7 +39,7 @@ public class DefaultMappedConstraintSour
     protected final Logger logger = Logger.getLogger(getClass().getName());
 
     private Map<String, Map<String, PropertyDetails>> propertyDetailsMap =
-            new HashMap<String, Map<String, PropertyDetails>>();
+            new ConcurrentHashMap<String, Map<String, PropertyDetails>>();
 
     public void storeMapping(Class originalClass, String originalProperty, PropertyDetails targetPropertyDetails)
     {
@@ -97,8 +98,14 @@ public class DefaultMappedConstraintSour
         String key = ProxyUtils.getClassName(target);
         if(!this.propertyDetailsMap.containsKey(key))
         {
-            this.propertyDetailsMap.put(key, new HashMap<String, PropertyDetails>());
+            this.propertyDetailsMap
+                    .put(key, new NullValueAwareConcurrentHashMap<String, PropertyDetails>(createDefaultValue()));
         }
         return this.propertyDetailsMap.get(key);
     }
+
+    private PropertyDetails createDefaultValue()
+    {
+        return new PropertyDetails(null, null, null);
+    }
 }

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultMetaDataStorage.java Tue Jun 22 23:04:19 2010
@@ -27,16 +27,17 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformationKeys;
 import org.apache.myfaces.extensions.validator.core.property.DefaultPropertyInformation;
 import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+import org.apache.myfaces.extensions.validator.util.NullValueAwareConcurrentHashMap;
 
 import java.util.Map;
-import java.util.HashMap;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Logger;
 
 /**
@@ -49,7 +50,7 @@ public class DefaultMetaDataStorage impl
     protected final Logger logger = Logger.getLogger(getClass().getName());
 
     private Map<String, Map<String, PropertyInformation>> cachedPropertyInformation =
-            new HashMap<String, Map<String, PropertyInformation>>();
+            new ConcurrentHashMap<String, Map<String, PropertyInformation>>();
 
     private List<MetaDataStorageFilter> metaDataStorageFilters = new ArrayList<MetaDataStorageFilter>();
     private List<Class<? extends MetaDataStorageFilter>> deniedMetaDataFilters =
@@ -65,7 +66,7 @@ public class DefaultMetaDataStorage impl
         List<String> metaDataStorageFilterClassNames = new ArrayList<String>();
 
         metaDataStorageFilterClassNames
-            .add(WebXmlParameter.CUSTOM_META_DATA_STORAGE_FILTER);
+            .add(ExtValCoreConfiguration.get().customMetaDataStorageFilterClassName());
         metaDataStorageFilterClassNames
             .add(ExtValContext.getContext().getInformationProviderBean().get(
                     CustomInformation.META_DATA_STORAGE_FILTER));
@@ -112,6 +113,11 @@ public class DefaultMetaDataStorage impl
     {
         PropertyInformation propertyInformation = getMapForClass(targetClass).get(targetProperty);
 
+        if(propertyInformation == null)
+        {
+            return new MetaDataEntry[]{};
+        }
+        
         PropertyInformation clonedPropertyInformation = new DefaultPropertyInformation();
         copyMetaData(propertyInformation, clonedPropertyInformation);
 
@@ -210,11 +216,17 @@ public class DefaultMetaDataStorage impl
         String key = ProxyUtils.getClassName(target);
         if(!this.cachedPropertyInformation.containsKey(key))
         {
-            this.cachedPropertyInformation.put(key, new HashMap<String, PropertyInformation>());
+            this.cachedPropertyInformation
+                    .put(key, new NullValueAwareConcurrentHashMap<String, PropertyInformation>(createDefaultValue()));
         }
         return this.cachedPropertyInformation.get(key);
     }
 
+    private PropertyInformation createDefaultValue()
+    {
+        return new DefaultPropertyInformation();
+    }
+
     private Class<? extends MetaDataStorageFilter> getStorageFilterClass(MetaDataStorageFilter storageFilter)
     {
         return ProxyUtils.getUnproxiedClass(storageFilter.getClass(), MetaDataStorageFilter.class);

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultPropertyStorage.java Tue Jun 22 23:04:19 2010
@@ -24,8 +24,9 @@ import org.apache.myfaces.extensions.val
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.util.HashMap;
 import java.util.Map;
+import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Logger;
 
 /**
@@ -37,15 +38,15 @@ public class DefaultPropertyStorage impl
 {
     protected final Logger logger = Logger.getLogger(getClass().getName());
 
-    private Map<String, Map<String, Field>> fieldMap = new HashMap<String, Map<String, Field>>();
-    private Map<String, Map<String, Method>> methodMap = new HashMap<String, Map<String, Method>>();
+    private Map<String, Map<String, Field>> fieldMap = new ConcurrentHashMap<String, Map<String, Field>>();
+    private Map<String, Map<String, Method>> methodMap = new ConcurrentHashMap<String, Map<String, Method>>();
 
-    public void storeField(Class targetClass, String property, Field field)
+    public synchronized void storeField(Class targetClass, String property, Field field)
     {
         getFieldMapForClass(targetClass).put(property, field);
     }
 
-    public void storeMethod(Class targetClass, String property, Method method)
+    public synchronized void storeMethod(Class targetClass, String property, Method method)
     {
         getMethodMapForClass(targetClass).put(property,  method);
     }

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/storage/DefaultStorageManagerFactory.java Tue Jun 22 23:04:19 2010
@@ -32,7 +32,7 @@ import static org.apache.myfaces.extensi
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Logger;
 
 /**
@@ -49,7 +49,7 @@ public class DefaultStorageManagerFactor
 
     private boolean lazyStaticMappingApplied = false;
     private List<NameMapper<Class>> nameMapperList = new ArrayList<NameMapper<Class>>();
-    private Map<Class, StorageManager> storageTypeToStorageManagerMap = new HashMap<Class, StorageManager>();
+    private Map<Class, StorageManager> storageTypeToStorageManagerMap = new ConcurrentHashMap<Class, StorageManager>();
 
     public DefaultStorageManagerFactory()
     {
@@ -156,7 +156,7 @@ public class DefaultStorageManagerFactor
         return this.nameMapperList;
     }
 
-    public void setStorageManager(Class storageType, StorageManager storageManager, boolean override)
+    public synchronized void setStorageManager(Class storageType, StorageManager storageManager, boolean override)
     {
         if(!this.storageTypeToStorageManagerMap.containsKey(storageType) ||
                 (this.storageTypeToStorageManagerMap.containsKey(storageType) && override))

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java Tue Jun 22 23:04:19 2010
@@ -18,9 +18,9 @@
  */
 package org.apache.myfaces.extensions.validator.core.validation.message.resolver;
 
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
@@ -46,7 +46,7 @@ public abstract class AbstractValidation
 
     protected final Logger logger = Logger.getLogger(getClass().getName());
 
-    private static String deactivateDefaultConvention = WebXmlParameter.DEACTIVATE_DEFAULT_CONVENTION;
+    private static boolean deactivateDefaultConvention = ExtValCoreConfiguration.get().deactivateDefaultConvention();
     private static ResourceBundle defaultBundle = null;
     private String messageBundleBaseName;
     //with jsf 1.1 only available if there is a custom bean
@@ -162,8 +162,7 @@ public abstract class AbstractValidation
 
     private String tryToUseMessageBundleConvention(String key, Locale locale)
     {
-        if ((deactivateDefaultConvention == null || !deactivateDefaultConvention.equalsIgnoreCase("true"))
-            && isDefaultMessageBundleConventionActive())
+        if ((deactivateDefaultConvention) && isDefaultMessageBundleConventionActive())
         {
             if (defaultBundle == null)
             {
@@ -175,7 +174,7 @@ public abstract class AbstractValidation
                 catch (Exception e)
                 {
                     //do nothing
-                    deactivateDefaultConvention = "true";
+                    deactivateDefaultConvention = true;
                 }
             }
 

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultMessageResolverFactory.java Tue Jun 22 23:04:19 2010
@@ -28,13 +28,13 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+import org.apache.myfaces.extensions.validator.util.NullValueAwareConcurrentHashMap;
 import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.logging.Logger;
@@ -106,7 +106,7 @@ public class DefaultMessageResolverFacto
 
     private synchronized void initStaticMappings()
     {
-        strategyMessageResolverMapping = new HashMap<String, String>();
+        strategyMessageResolverMapping = new NullValueAwareConcurrentHashMap<String, String>(String.class);
 
         //setup internal static mappings
         for (StaticConfiguration<String, String> staticConfig :

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultValidationErrorMessageResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultValidationErrorMessageResolver.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultValidationErrorMessageResolver.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/DefaultValidationErrorMessageResolver.java Tue Jun 22 23:04:19 2010
@@ -18,8 +18,8 @@
  */
 package org.apache.myfaces.extensions.validator.core.validation.message.resolver;
 
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.InternalConventionProvider;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
@@ -33,7 +33,7 @@ import org.apache.myfaces.extensions.val
 @UsageInformation({UsageCategory.INTERNAL, UsageCategory.CUSTOMIZABLE})
 public class DefaultValidationErrorMessageResolver extends AbstractValidationErrorMessageResolver
 {
-    private static final String CUSTOM_BUNDLE = WebXmlParameter.CUSTOM_MESSAGE_BUNDLE;
+    private static final String CUSTOM_BUNDLE = ExtValCoreConfiguration.get().customMessageBundleBaseName();
 
     //not used at the moment - just for a convention
     protected String getBaseName()
@@ -45,4 +45,4 @@ public class DefaultValidationErrorMessa
     {
         return CUSTOM_BUNDLE;
     }
-}
\ No newline at end of file
+}

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/CustomConfiguredValidationStrategyToMsgResolverNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/CustomConfiguredValidationStrategyToMsgResolverNameMapper.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/CustomConfiguredValidationStrategyToMsgResolverNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/mapper/CustomConfiguredValidationStrategyToMsgResolverNameMapper.java Tue Jun 22 23:04:19 2010
@@ -18,8 +18,8 @@
  */
 package org.apache.myfaces.extensions.validator.core.validation.message.resolver.mapper;
 
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.InvocationOrder;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper;
 import org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
@@ -40,6 +40,6 @@ public class CustomConfiguredValidationS
 
     protected String getCustomNameMapperClassName()
     {
-        return WebXmlParameter.CUSTOM_VALIDATION_STRATEGY_TO_MESSAGE_RESOLVER_NAME_MAPPER;
+        return ExtValCoreConfiguration.get().customValidationStrategyToMessageResolverNameMapperClassName();
     }
 }
\ No newline at end of file

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterExtractorFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterExtractorFactory.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterExtractorFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterExtractorFactory.java Tue Jun 22 23:04:19 2010
@@ -20,9 +20,9 @@ package org.apache.myfaces.extensions.va
 
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 
 import java.util.ArrayList;
@@ -51,7 +51,8 @@ public class DefaultValidationParameterE
         {
             List<String> validationParameterExtractorClassNames = new ArrayList<String>();
 
-            validationParameterExtractorClassNames.add(WebXmlParameter.CUSTOM_VALIDATION_PARAMETER_EXTRACTOR);
+            validationParameterExtractorClassNames
+                    .add(ExtValCoreConfiguration.get().customValidationParameterExtractorClassName());
             validationParameterExtractorClassNames
                 .add(ExtValContext.getContext().getInformationProviderBean()
                     .get(CustomInformation.VALIDATION_PARAMETER_EXTRACTOR));
@@ -73,4 +74,4 @@ public class DefaultValidationParameterE
 
         return validationParameterExtractor;
     }
-}
\ No newline at end of file
+}

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterFactory.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/parameter/DefaultValidationParameterFactory.java Tue Jun 22 23:04:19 2010
@@ -27,7 +27,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -40,7 +40,7 @@ import java.util.Map;
 @UsageInformation(UsageCategory.INTERNAL)
 public class DefaultValidationParameterFactory implements ClassMappingFactory<Class, Class>
 {
-    private Map<Class, Class> parameterMapping = new HashMap<Class, Class>();
+    private Map<Class, Class> parameterMapping = new ConcurrentHashMap<Class, Class>();
 
     public Class create(Class source)
     {
@@ -120,4 +120,4 @@ public class DefaultValidationParameterF
     {
         this.parameterMapping.put(source, target);
     }
-}
\ No newline at end of file
+}

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/DefaultValidationStrategyFactory.java Tue Jun 22 23:04:19 2010
@@ -20,9 +20,9 @@ package org.apache.myfaces.extensions.va
 
 import org.apache.myfaces.extensions.validator.core.factory.ClassMappingFactory;
 import org.apache.myfaces.extensions.validator.core.factory.AbstractNameMapperAwareFactory;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
 import org.apache.myfaces.extensions.validator.core.initializer.configuration.StaticConfiguration;
 import org.apache.myfaces.extensions.validator.core.initializer.configuration.StaticConfigurationEntry;
@@ -32,13 +32,13 @@ import org.apache.myfaces.extensions.val
     .AnnotationToValidationStrategyBeanNameMapper;
 import org.apache.myfaces.extensions.validator.util.ClassUtils;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.NullValueAwareConcurrentHashMap;
 import org.apache.myfaces.extensions.validator.internal.ToDo;
 import org.apache.myfaces.extensions.validator.internal.Priority;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.MissingResourceException;
@@ -132,7 +132,7 @@ public class DefaultValidationStrategyFa
     @ToDo(value = Priority.MEDIUM, description = "logging")
     private synchronized void initStaticMappings()
     {
-        metaDataKeyToValidationStrategyMapping = new HashMap<String, String>();
+        metaDataKeyToValidationStrategyMapping = new NullValueAwareConcurrentHashMap<String, String>(String.class);
 
         //setup internal static mappings
         for (StaticConfiguration<String, String> staticConfig :
@@ -158,7 +158,7 @@ public class DefaultValidationStrategyFa
         }
 
         //setup custom mapping - overrides all other mappings
-        String customMappingBaseName = WebXmlParameter.CUSTOM_STATIC_VALIDATION_STRATEGY_MAPPING;
+        String customMappingBaseName = ExtValCoreConfiguration.get().customStaticValidationStrategyMappingSource();
         if (customMappingBaseName != null)
         {
             try

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/strategy/mapper/CustomConfiguredAnnotationToValidationStrategyNameMapper.java Tue Jun 22 23:04:19 2010
@@ -18,8 +18,8 @@
  */
 package org.apache.myfaces.extensions.validator.core.validation.strategy.mapper;
 
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
 import org.apache.myfaces.extensions.validator.core.InvocationOrder;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
@@ -38,6 +38,6 @@ public class CustomConfiguredAnnotationT
 {
     protected String getCustomNameMapperClassName()
     {
-        return WebXmlParameter.CUSTOM_META_DATA_TO_VALIDATION_STRATEGY_NAME_MAPPER;
+        return ExtValCoreConfiguration.get().customMetaDataToValidationStrategyNameMapperClassName();
     }
 }

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ConstraintSourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ConstraintSourceUtils.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ConstraintSourceUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ConstraintSourceUtils.java Tue Jun 22 23:04:19 2010
@@ -23,13 +23,9 @@ import java.lang.reflect.Field;
 import java.beans.Introspector;
 import java.lang.reflect.Method;
 
-import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.myfaces.extensions.validator.core.storage.MappedConstraintSourceStorage;
-import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
-import org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 
@@ -98,8 +94,8 @@ public final class ConstraintSourceUtils
 
     private static Class findMappedClass(Class baseBeanClass, String property)
     {
-        Class<? extends Annotation> constraintSourceAnnotationImplementation = (Class) ExtValContext.getContext()
-                .getGlobalProperty(ConstraintSource.class.getName());
+        Class<? extends Annotation> constraintSourceAnnotationImplementation = ExtValCoreConfiguration.get()
+                .constraintSourceAnnotation();
 
         Annotation foundConstraintSourceAnnotation = tryToGetAnnotationFromProperty(
                 baseBeanClass, property, constraintSourceAnnotationImplementation);
@@ -152,12 +148,12 @@ public final class ConstraintSourceUtils
 
     private static Class<? extends Annotation> getTargetPropertyAnnotationImplementation()
     {
-        return (Class) ExtValContext.getContext().getGlobalProperty(TargetProperty.class.getName());
+        return ExtValCoreConfiguration.get().targetPropertyAnnotation();
     }
 
     private static Class<? extends Annotation> getTargetPropertyIdAnnotationImplementation()
     {
-        return (Class) ExtValContext.getContext().getGlobalProperty(TargetPropertyId.class.getName());
+        return ExtValCoreConfiguration.get().targetPropertyIdAnnotation();
     }
 
     private static String extractNewPropertyName(Class targetClass, Annotation annotation)
@@ -284,7 +280,7 @@ public final class ConstraintSourceUtils
 
     private static Class<? extends Annotation> getIgnoreConstraintSourceAnnotationImplementation()
     {
-        return (Class) ExtValContext.getContext().getGlobalProperty(IgnoreConstraintSource.class.getName());
+        return (Class) ExtValCoreConfiguration.get().ignoreConstraintSourceAnnotation();
     }
 
     private static Annotation tryToGetAnnotationFromField(

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java Tue Jun 22 23:04:19 2010
@@ -19,7 +19,7 @@
 package org.apache.myfaces.extensions.validator.util;
 
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.ValidationModuleKey;
 import org.apache.myfaces.extensions.validator.core.ProjectStageName;
 import org.apache.myfaces.extensions.validator.core.el.AbstractELHelperFactory;
@@ -532,7 +532,7 @@ public class ExtValUtils
 
     private static boolean isValidationParameterExtractionDeactivated()
     {
-        return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_VALIDATION_PARAMETERS);
+        return ExtValCoreConfiguration.get().deactivateValidationParameters();
     }
 
     public static boolean executeLocalBeforeValidationInterceptors(FacesContext facesContext,
@@ -803,12 +803,12 @@ public class ExtValUtils
     public static boolean interpretEmptyStringValuesAsNull()
     {
         //to deactivate: the parameter has to be explicitly false
-        return !"false".equalsIgnoreCase(WebXmlParameter.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL);
+        return ExtValCoreConfiguration.get().interpretEmptyStringSubmittedValuesAsNull();
     }
 
     public static boolean validateEmptyFields()
     {
-        return !"false".equalsIgnoreCase(WebXmlParameter.VALIDATE_EMPTY_FIELDS);
+        return ExtValCoreConfiguration.get().validateEmptyFields();
     }
 
     public static PropertyDetails getPropertyDetails(PropertyInformation propertyInformation)
@@ -975,7 +975,7 @@ public class ExtValUtils
      */
     public static boolean isRequiredInitializationActive()
     {
-        return Boolean.TRUE.equals(ExtValContext.getContext().getGlobalProperty("mode:init:required"));
+        return ExtValCoreConfiguration.get().activateRequiredInitialization();
     }
 
     /**
@@ -987,7 +987,7 @@ public class ExtValUtils
      */
     public static boolean isRequiredResetActivated()
     {
-        return Boolean.TRUE.equals(ExtValContext.getContext().getGlobalProperty("mode:reset:required"));
+        return ExtValCoreConfiguration.get().deactivateRequiredAttributeSupport();
     }
 
     public static ProjectStageName getDefaultStageName()

Added: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/NullValueAwareConcurrentHashMap.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/NullValueAwareConcurrentHashMap.java?rev=957073&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/NullValueAwareConcurrentHashMap.java (added)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/NullValueAwareConcurrentHashMap.java Tue Jun 22 23:04:19 2010
@@ -0,0 +1,104 @@
+/*
+ * 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.myfaces.extensions.validator.util;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.Map;
+
+/**
+ * in some cases we have to store null values to avoid re-evaluation
+ * 
+ * @author Gerhard Petracek
+ */
+public class NullValueAwareConcurrentHashMap<K, V> extends ConcurrentHashMap<K, V>
+{
+    private static final long serialVersionUID = -7294527213622879543L;
+
+    private V nullMarkerValue;
+
+    protected NullValueAwareConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel)
+    {
+        super(initialCapacity, loadFactor, concurrencyLevel);
+    }
+
+    protected NullValueAwareConcurrentHashMap(int initialCapacity, float loadFactor)
+    {
+        super(initialCapacity, loadFactor);
+    }
+
+    protected NullValueAwareConcurrentHashMap(int initialCapacity)
+    {
+        super(initialCapacity);
+    }
+
+    protected NullValueAwareConcurrentHashMap(Map<? extends K, ? extends V> m)
+    {
+        super(m);
+    }
+
+    public NullValueAwareConcurrentHashMap(V nullMarkerValue)
+    {
+        this.nullMarkerValue = nullMarkerValue;
+    }
+
+    public NullValueAwareConcurrentHashMap(Class<? extends V> nullMarkerValueClass)
+    {
+        if(nullMarkerValueClass.getName().equals(Object.class.getName()))
+        {
+            //noinspection unchecked
+            nullMarkerValue = (V)new DefaultNullMarker();
+        }
+        else if(nullMarkerValueClass.getName().equals(String.class.getName()))
+        {
+            //noinspection unchecked
+            nullMarkerValue = (V)"{null}";
+        }
+        else
+        {
+            nullMarkerValue = ClassUtils.tryToInstantiateClass(nullMarkerValueClass);
+        }
+    }
+
+    @Override
+    public V put(K key, V value)
+    {
+        if(value == null)
+        {
+            return super.put(key, nullMarkerValue);
+        }
+        return super.put(key, value);
+    }
+
+    @Override
+    public V get(Object key)
+    {
+        V result = super.get(key);
+
+        if(nullMarkerValue.equals(result))
+        {
+            return null;
+        }
+
+        return result;
+    }
+
+    private class DefaultNullMarker
+    {
+    }
+}

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/core/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java Tue Jun 22 23:04:19 2010
@@ -20,7 +20,7 @@ package org.apache.myfaces.extensions.va
 
 import org.apache.myfaces.extensions.validator.core.proxy.ProxyHelper;
 import org.apache.myfaces.extensions.validator.core.proxy.DefaultProxyHelper;
-import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 
@@ -73,26 +73,8 @@ public class ProxyUtils
                 return new DefaultProxyHelper();
             }
 
-            proxyHelper = createProxyHelper();
+            proxyHelper = ExtValCoreConfiguration.get().proxyHelper();
         }
         return proxyHelper;
     }
-
-    //don't use the default approach (factory finder) - ProxyHelper is called too often...
-    private static ProxyHelper createProxyHelper()
-    {
-        String customProxyHelperClassName = WebXmlParameter.CUSTOM_PROXY_HELPER;
-
-        ProxyHelper result = null;
-        if(customProxyHelperClassName != null && !"".equals(customProxyHelperClassName))
-        {
-            result = (ProxyHelper)ClassUtils.tryToInstantiateClassForName(customProxyHelperClassName);
-        }
-        if(result == null)
-        {
-            result = new DefaultProxyHelper();
-        }
-
-        return result;
-    }
 }

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/base-test-infrastructure/src/test/java/org/apache/myfaces/extensions/validator/test/base/AbstractExValTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/base-test-infrastructure/src/test/java/org/apache/myfaces/extensions/validator/test/base/AbstractExValTestCase.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/base-test-infrastructure/src/test/java/org/apache/myfaces/extensions/validator/test/base/AbstractExValTestCase.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/base-test-infrastructure/src/test/java/org/apache/myfaces/extensions/validator/test/base/AbstractExValTestCase.java Tue Jun 22 23:04:19 2010
@@ -30,7 +30,8 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.core.factory.DefaultFactoryFinder;
 import org.apache.myfaces.extensions.validator.core.factory.FactoryNames;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
-import org.apache.myfaces.extensions.validator.core.ProjectStageResolver;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
+import org.apache.myfaces.extensions.validator.core.DefaultExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.core.el.AbstractELHelperFactory;
 import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.shared_impl.config.MyfacesConfig;
@@ -174,10 +175,15 @@ public abstract class AbstractExValTestC
             private static final long serialVersionUID = -3861810605160281884L;
 
             @Override
+            protected void initModuleConfig()
+            {
+                ExtValCoreConfiguration.use(new DefaultExtValCoreConfiguration(), true);
+            }
+
+            @Override
             protected void init()
             {
-                ExtValContext.getContext()
-                        .addGlobalProperty(ProjectStageResolver.class.getName(), getProjectStageResolver(), false);
+                initModuleConfig();
                 super.init();
             }
         }.init();

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/AbstractBeanValidationTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/AbstractBeanValidationTestCase.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/AbstractBeanValidationTestCase.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/AbstractBeanValidationTestCase.java Tue Jun 22 23:04:19 2010
@@ -41,6 +41,7 @@ public class AbstractBeanValidationTestC
             @Override
             protected void init()
             {
+                super.initModuleConfig();
                 super.init();
             }
         }.init();

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/bean-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/beanval/ConstraintSourceAwareValidation6TestCase.java Tue Jun 22 23:04:19 2010
@@ -20,18 +20,16 @@ package org.apache.myfaces.extensions.va
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware6Bean;
+import org.apache.myfaces.extensions.validator.core.DefaultExtValCoreConfiguration;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomConstraintSource;
 import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomIgnoreConstraintSource;
 import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomTargetProperty;
 import org.apache.myfaces.extensions.validator.test.beanval.custom.CustomTargetPropertyId;
-import org.apache.myfaces.extensions.validator.core.ExtValContext;
-import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
-import org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId;
+import org.apache.myfaces.extensions.validator.test.beanval.model.ConstraintSourceAware6Bean;
 
 import javax.faces.application.FacesMessage;
+import java.lang.annotation.Annotation;
 
 /**
  * EXTVAL-83
@@ -59,12 +57,32 @@ public class ConstraintSourceAwareValida
     protected void setUp() throws Exception
     {
         super.setUp();
-        ExtValContext extValContext = ExtValContext.getContext();
 
-        extValContext.addGlobalProperty(ConstraintSource.class.getName(), CustomConstraintSource.class);
-        extValContext.addGlobalProperty(IgnoreConstraintSource.class.getName(), CustomIgnoreConstraintSource.class);
-        extValContext.addGlobalProperty(TargetProperty.class.getName(), CustomTargetProperty.class);
-        extValContext.addGlobalProperty(TargetPropertyId.class.getName(), CustomTargetPropertyId.class);
+        ExtValCoreConfiguration.use(new DefaultExtValCoreConfiguration() {
+            @Override
+            public Class<? extends Annotation> constraintSourceAnnotation()
+            {
+                return CustomConstraintSource.class;
+            }
+
+            @Override
+            public Class<? extends Annotation> ignoreConstraintSourceAnnotation()
+            {
+                return CustomIgnoreConstraintSource.class;
+            }
+
+            @Override
+            public Class<? extends Annotation> targetPropertyAnnotation()
+            {
+                return CustomTargetProperty.class;
+            }
+
+            @Override
+            public Class<? extends Annotation> targetPropertyIdAnnotation()
+            {
+                return CustomTargetPropertyId.class;
+            }
+        }, true);
     }
 
     public void testCustomAnnotations1()

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/core-tests/src/test/java/org/apache/myfaces/extensions/validator/test/core/stage/IndependentProjectStageTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/core-tests/src/test/java/org/apache/myfaces/extensions/validator/test/core/stage/IndependentProjectStageTestCase.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/core-tests/src/test/java/org/apache/myfaces/extensions/validator/test/core/stage/IndependentProjectStageTestCase.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/core-tests/src/test/java/org/apache/myfaces/extensions/validator/test/core/stage/IndependentProjectStageTestCase.java Tue Jun 22 23:04:19 2010
@@ -49,51 +49,58 @@ public class IndependentProjectStageTest
     {
         super.setUp();
 
-        ExtValContext.getContext().addGlobalProperty(ProjectStageResolver.class.getName(), new DefaultProjectStageResolver()
+        ExtValCoreConfiguration.use(new DefaultExtValCoreConfiguration()
         {
             @Override
-            public ProjectStage getCurrentProjectStage()
+            public ProjectStageResolver projectStageResolver()
             {
-                String jsfProjectStageName = resolveProjectStageName("javax.faces.PROJECT_STAGE");
-                String independentProjectStageName = resolveProjectStageName(INDEPENDENT_PROJECT_STAGE);
-
-                if (!(jsfProjectStageName == null || "".equals(jsfProjectStageName)))
+                return new DefaultProjectStageResolver()
                 {
-                    ProjectStageName result = ProjectStage.createStageName(jsfProjectStageName.trim());
-                    for(JsfProjectStage jsfProjectStage : JsfProjectStage.values())
+                    @Override
+                    public ProjectStage getCurrentProjectStage()
                     {
-                        if(jsfProjectStage.getValue().equals(result))
+                        String jsfProjectStageName = resolveProjectStageName("javax.faces.PROJECT_STAGE");
+                        String independentProjectStageName = resolveProjectStageName(INDEPENDENT_PROJECT_STAGE);
+
+                        if (!(jsfProjectStageName == null || "".equals(jsfProjectStageName)))
                         {
-                            return ProjectStage.createStage(result);
+                            ProjectStageName result = ProjectStage.createStageName(jsfProjectStageName.trim());
+                            for (JsfProjectStage jsfProjectStage : JsfProjectStage.values())
+                            {
+                                if (jsfProjectStage.getValue().equals(result))
+                                {
+                                    return ProjectStage.createStage(result);
+                                }
+                            }
                         }
-                    }
-                }
-
-                if(!(independentProjectStageName == null || "".equals(independentProjectStageName)))
-                {
-                    ProjectStageName independentResult = ProjectStage.createStageName(independentProjectStageName.trim());
 
-                    //check jsf stage values first
-                    ProjectStageName result = ProjectStage.createStageName(independentProjectStageName.trim());
-                    for(JsfProjectStage jsfProjectStage : JsfProjectStage.values())
-                    {
-                        if(jsfProjectStage.getValue().equals(result))
+                        if (!(independentProjectStageName == null || "".equals(independentProjectStageName)))
                         {
-                            return ProjectStage.createStage(result);
+                            ProjectStageName independentResult = ProjectStage.createStageName(independentProjectStageName.trim());
+
+                            //check jsf stage values first
+                            ProjectStageName result = ProjectStage.createStageName(independentProjectStageName.trim());
+                            for (JsfProjectStage jsfProjectStage : JsfProjectStage.values())
+                            {
+                                if (jsfProjectStage.getValue().equals(result))
+                                {
+                                    return ProjectStage.createStage(result);
+                                }
+                            }
+
+                            //check custom stage values
+                            if (ProjectStage.createStageName(CUSTOM_DEV).equals(independentResult) ||
+                                    ProjectStage.createStageName(CUSTOM_TEST).equals(independentResult))
+                            {
+                                return ProjectStage.createStage(independentResult);
+                            }
                         }
-                    }
 
-                    //check custom stage values
-                    if(ProjectStage.createStageName(CUSTOM_DEV).equals(independentResult) ||
-                            ProjectStage.createStageName(CUSTOM_TEST).equals(independentResult))
-                    {
-                        return ProjectStage.createStage(independentResult);
+                        return createProjectStage(ProjectStage.createStageName(CUSTOM_PROD));
                     }
-                }
-
-                return createProjectStage(ProjectStage.createStageName(CUSTOM_PROD));
+                };
             }
-        });
+        }, true);
     }
 
     private String resolveProjectStageName(String parameterName)
@@ -113,7 +120,6 @@ public class IndependentProjectStageTest
     protected void tearDown() throws Exception
     {
         super.tearDown();
-        ExtValContext.getContext().addGlobalProperty(ProjectStageResolver.class.getName(), new DefaultProjectStageResolver());
     }
 
     public void testDevelopmentStage()
@@ -165,4 +171,4 @@ public class IndependentProjectStageTest
     {
         assertFalse(ProjectStage.is(ProjectStage.createStageName(CUSTOM_TEST)));
     }
-}
\ No newline at end of file
+}

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/AbstractPropertyValidationTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/AbstractPropertyValidationTestCase.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/AbstractPropertyValidationTestCase.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/AbstractPropertyValidationTestCase.java Tue Jun 22 23:04:19 2010
@@ -40,6 +40,7 @@ public abstract class AbstractPropertyVa
             @Override
             protected void init()
             {
+                super.initModuleConfig();
                 super.init();
             }
         }.init();

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/constraintsource/ConstraintSourceAwareValidation6TestCase.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/constraintsource/ConstraintSourceAwareValidation6TestCase.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/constraintsource/ConstraintSourceAwareValidation6TestCase.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/test-modules/property-validation-tests/src/test/java/org/apache/myfaces/extensions/validator/test/propval/constraintsource/ConstraintSourceAwareValidation6TestCase.java Tue Jun 22 23:04:19 2010
@@ -1,21 +1,18 @@
 package org.apache.myfaces.extensions.validator.test.propval.constraintsource;
 
-import javax.faces.application.FacesMessage;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
-import org.apache.myfaces.extensions.validator.core.ExtValContext;
-import org.apache.myfaces.extensions.validator.core.validation.ConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.IgnoreConstraintSource;
-import org.apache.myfaces.extensions.validator.core.validation.TargetProperty;
-import org.apache.myfaces.extensions.validator.core.validation.TargetPropertyId;
+import org.apache.myfaces.extensions.validator.core.DefaultExtValCoreConfiguration;
+import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
 import org.apache.myfaces.extensions.validator.test.propval.constraintsource.custom.CustomConstraintSource;
 import org.apache.myfaces.extensions.validator.test.propval.constraintsource.custom.CustomIgnoreConstraintSource;
 import org.apache.myfaces.extensions.validator.test.propval.constraintsource.custom.CustomTargetProperty;
 import org.apache.myfaces.extensions.validator.test.propval.constraintsource.custom.CustomTargetPropertyId;
 import org.apache.myfaces.extensions.validator.test.propval.constraintsource.model.ConstraintSourceAware6Bean;
 
+import javax.faces.application.FacesMessage;
+import java.lang.annotation.Annotation;
+
 public class ConstraintSourceAwareValidation6TestCase extends
         AbstractConstraintSourceTestCase<ConstraintSourceAware6Bean>
 {
@@ -38,16 +35,31 @@ public class ConstraintSourceAwareValida
     protected void setUp() throws Exception
     {
         super.setUp();
-        ExtValContext extValContext = ExtValContext.getContext();
-
-        extValContext.addGlobalProperty(ConstraintSource.class.getName(),
-                CustomConstraintSource.class);
-        extValContext.addGlobalProperty(IgnoreConstraintSource.class.getName(),
-                CustomIgnoreConstraintSource.class);
-        extValContext.addGlobalProperty(TargetProperty.class.getName(),
-                CustomTargetProperty.class);
-        extValContext.addGlobalProperty(TargetPropertyId.class.getName(),
-                CustomTargetPropertyId.class);
+        ExtValCoreConfiguration.use(new DefaultExtValCoreConfiguration() {
+            @Override
+            public Class<? extends Annotation> constraintSourceAnnotation()
+            {
+                return CustomConstraintSource.class;
+            }
+
+            @Override
+            public Class<? extends Annotation> ignoreConstraintSourceAnnotation()
+            {
+                return CustomIgnoreConstraintSource.class;
+            }
+
+            @Override
+            public Class<? extends Annotation> targetPropertyAnnotation()
+            {
+                return CustomTargetProperty.class;
+            }
+
+            @Override
+            public Class<? extends Annotation> targetPropertyIdAnnotation()
+            {
+                return CustomTargetPropertyId.class;
+            }
+        }, true);
     }
 
     public void testCustomAnnotations1()

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java Tue Jun 22 23:04:19 2010
@@ -221,7 +221,11 @@ public class BeanValidationUtils
         if (validatorFactory == null)
         {
             validatorFactory = Validation.buildDefaultValidatorFactory();
-            applicationMap.put(VALIDATOR_FACTORY_KEY, validatorFactory);
+
+            synchronized (applicationMap)
+            {
+                applicationMap.put(VALIDATOR_FACTORY_KEY, validatorFactory);
+            }
         }
         return validatorFactory;
     }

Modified: myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/PropertyValidationModuleStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/PropertyValidationModuleStartupListener.java?rev=957073&r1=957072&r2=957073&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/PropertyValidationModuleStartupListener.java (original)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/PropertyValidationModuleStartupListener.java Tue Jun 22 23:04:19 2010
@@ -18,7 +18,8 @@
  */
 package org.apache.myfaces.extensions.validator;
 
-import org.apache.myfaces.extensions.validator.baseval.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.baseval.ExtValBaseValidationModuleConfiguration;
+import org.apache.myfaces.extensions.validator.baseval.DefaultExtValBaseValidationModuleConfiguration;
 import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
 import org.apache.myfaces.extensions.validator.core.startup.AbstractStartupListener;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
@@ -44,6 +45,8 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.crossval.storage.mapper.CrossValidationStorageNameMapper;
 import org.apache.myfaces.extensions.validator.crossval.storage.mapper.ProcessedInformationStorageNameMapper;
 import org.apache.myfaces.extensions.validator.crossval.CrossValidationPhaseListener;
+import org.apache.myfaces.extensions.validator.crossval.ExtValCrossValidationModuleConfiguration;
+import org.apache.myfaces.extensions.validator.crossval.DefaultExtValCrossValidationModuleConfiguration;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
 import org.apache.myfaces.extensions.validator.util.JsfUtils;
 
@@ -56,6 +59,12 @@ public class PropertyValidationModuleSta
 {
     private static final long serialVersionUID = -2474361612857222283L;
 
+    protected void initModuleConfig()
+    {
+        ExtValBaseValidationModuleConfiguration.use(new DefaultExtValBaseValidationModuleConfiguration(), false);
+        ExtValCrossValidationModuleConfiguration.use(new DefaultExtValCrossValidationModuleConfiguration(), false);
+    }
+    
     protected void init()
     {
         initProcessedInformationRecorders();
@@ -76,9 +85,7 @@ public class PropertyValidationModuleSta
 
     private void initStaticStrategyMappings()
     {
-        String jpaBasedValidation = WebXmlParameter.DEACTIVATE_JPA_BASED_VALIDATION;
-        if (jpaBasedValidation == null
-                || !jpaBasedValidation.equalsIgnoreCase("true"))
+        if (!ExtValBaseValidationModuleConfiguration.get().deactivateJpaBasedValidation())
         {
             StaticConfiguration<String, String> staticConfig = new StaticResourceBundleConfiguration();
             staticConfig.setSourceOfMapping(

Added: myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/DefaultExtValBaseValidationModuleConfiguration.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/DefaultExtValBaseValidationModuleConfiguration.java?rev=957073&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/DefaultExtValBaseValidationModuleConfiguration.java (added)
+++ myfaces/extensions/validator/branches/branch_for_extval-100/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/DefaultExtValBaseValidationModuleConfiguration.java Tue Jun 22 23:04:19 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.myfaces.extensions.validator.baseval;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+/**
+ * @author Gerhard Petracek
+ * @since r4
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class DefaultExtValBaseValidationModuleConfiguration extends ExtValBaseValidationModuleConfiguration
+{
+    public String jpaValidationErrorMessages()
+    {
+        return WebXmlParameter.VALIDATION_MESSAGES_JPA;
+    }
+
+    public boolean deactivateJpaBasedValidation()
+    {
+        return "true".equalsIgnoreCase(WebXmlParameter.DEACTIVATE_JPA_BASED_VALIDATION);
+    }
+}



Mime
View raw message