You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by va...@apache.org on 2010/09/07 21:05:44 UTC

svn commit: r993482 - in /geronimo/server/trunk/plugins: bval/bval-deployer/src/main/plan/ bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/ bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ j2ee/geronimo-j2ee/src/m...

Author: vamsic007
Date: Tue Sep  7 19:05:44 2010
New Revision: 993482

URL: http://svn.apache.org/viewvc?rev=993482&view=rev
Log:
GERONIMO-5222 Add support for application validation descriptor support for deployed applications
 o Support for web applications
 o ModuleBuilderExtension to add ValidatorFactoryGBean.
 o Hook the module builder extension to tomcat builder.

Added:
    geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java   (with props)
    geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java   (with props)
Modified:
    geronimo/server/trunk/plugins/bval/bval-deployer/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValNamingBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
    geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/bval/bval-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/bval/bval-deployer/src/main/plan/plan.xml?rev=993482&r1=993481&r2=993482&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/bval/bval-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/bval/bval-deployer/src/main/plan/plan.xml Tue Sep  7 19:05:44 2010
@@ -35,4 +35,5 @@
         <!--</xml-attribute>-->
     </gbean>
 
+    <gbean name="BValModuleBuilderExtension" class="org.apache.geronimo.bval.deployment.BValModuleBuilderExtension"/>
 </module>

Added: geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java?rev=993482&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java (added)
+++ geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java Tue Sep  7 19:05:44 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.geronimo.bval.deployment;
+
+import java.net.URL;
+import java.util.Collection;
+import java.util.jar.JarFile;
+
+import org.apache.geronimo.bval.ValidatorFactoryGBean;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.DeployableBundle;
+import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.osgi.framework.Bundle;
+
+/**
+ * Validation Module Builder extension to support customization of ValidatorFactory using validation.xml descriptors.
+ * 
+ * @version $Rev$ $Date$
+ */
+@GBean(j2eeType = NameFactory.MODULE_BUILDER)
+public class BValModuleBuilderExtension implements ModuleBuilderExtension {
+    // our default environment
+    protected Environment defaultEnvironment;
+
+    public BValModuleBuilderExtension(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment) {
+        this.defaultEnvironment = defaultEnvironment;
+    }
+
+    @Override
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder moduleIDBuilder) throws DeploymentException {
+    }
+
+    @Override
+    public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+
+    @Override
+    public void installModule(JarFile earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws DeploymentException {
+    }
+
+    @Override
+    public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException {
+        // don't do anything for Bundle-based deployments
+        if (module.getDeployable() instanceof DeployableBundle) {
+            return;
+        }
+        
+        String validationConfig = null; 
+        // the location of the validation config varies depending 
+        // on the module type
+        if (module.getType() == ConfigurationModuleType.WAR) {
+            validationConfig = "WEB-INF/validation.xml"; 
+        } else if (module.getType() == ConfigurationModuleType.EAR|| module.getType() == ConfigurationModuleType.EJB
+                   || module.getType() == ConfigurationModuleType.CAR || module.getType() == ConfigurationModuleType.RAR) {
+            validationConfig = "META-INF/validation.xml"; 
+        }
+
+        if(validationConfig != null && bundle.getEntry(validationConfig) == null) {
+            // No validation.xml file
+            validationConfig = null;
+        }
+        EARContext moduleContext = module.getEarContext();
+        AbstractName abstractName = moduleContext.getNaming().createChildName(module.getModuleName(), "ValidatorFactory", NameFactory.VALIDATOR_FACTORY);
+        GBeanData gbeanData = new GBeanData(abstractName, ValidatorFactoryGBean.class);
+        gbeanData.setAttribute("validationConfig", validationConfig);
+        try {
+            moduleContext.addGBean(gbeanData);
+        } catch (GBeanAlreadyExistsException e) {
+            throw new DeploymentException("Duplicate ValidatorFactory GBean", e);
+        }
+    }
+
+    @Override
+    public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection repository) throws DeploymentException {
+    }
+}
+

Propchange: geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValNamingBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValNamingBuilder.java?rev=993482&r1=993481&r2=993482&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValNamingBuilder.java (original)
+++ geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValNamingBuilder.java Tue Sep  7 19:05:44 2010
@@ -23,17 +23,23 @@ package org.apache.geronimo.bval.deploym
 import java.util.Collections;
 import java.util.Map;
 
+import javax.validation.ValidationException;
+import javax.validation.ValidatorFactory;
+
 import org.apache.geronimo.bval.DefaultValidatorFactoryReference;
 import org.apache.geronimo.bval.DefaultValidatorReference;
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.jndi.JndiKey;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.AbstractNamingBuilder;
+import org.apache.geronimo.naming.reference.ResourceReference;
 import org.apache.openejb.jee.InjectionTarget;
 import org.apache.openejb.jee.JndiConsumer;
 import org.apache.xmlbeans.QNameSet;
@@ -51,8 +57,21 @@ public class BValNamingBuilder extends A
 
     @Override
     public void buildNaming(JndiConsumer specDD, XmlObject xmlObject1, Module module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
+        try {
+            // perform a lookup on the bound GBean and add this as a resource reference.  If 
+            // we can't find one, then bind in a default validator. 
+            EARContext moduleContext = module.getEarContext();
+            AbstractName abstractName = moduleContext.getNaming().createChildName(module.getModuleName(), "ValidatorFactory", NameFactory.VALIDATOR_FACTORY);
+            // this verifies that the bean exists...if not, bind to a default factory reference. 
+            moduleContext.getGBeanInstance(abstractName);
+            String osgiJndiName = module.getEarContext().getNaming().toOsgiJndiName(abstractName);
+            String filter = "(osgi.jndi.service.name=" + osgiJndiName + ')';
+            put("java:comp/ValidatorFactory", new ResourceReference<ValidationException>(filter, ValidatorFactory.class.getName()), module.getJndiContext(), Collections.<InjectionTarget>emptyList(), sharedContext);
+        } catch (GBeanNotFoundException e) {
+            // if we can't find one on the module, then bind to a default validator factory 
+            put("java:comp/ValidatorFactory", new DefaultValidatorFactoryReference(), module.getJndiContext(), Collections.<InjectionTarget>emptyList(), sharedContext);
+        }
         put("java:comp/Validator", new DefaultValidatorReference(), module.getJndiContext(), Collections.<InjectionTarget>emptyList(), sharedContext);
-        put("java:comp/ValidatorFactory", new DefaultValidatorFactoryReference(), module.getJndiContext(), Collections.<InjectionTarget>emptyList(), sharedContext);
     }
 
     @Override

Added: geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java?rev=993482&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java (added)
+++ geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java Tue Sep  7 19:05:44 2010
@@ -0,0 +1,249 @@
+/**
+ *  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.geronimo.bval;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.Validation;
+import javax.validation.ValidationException;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.ValidationProvider;
+import javax.xml.XMLConstants;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+
+import org.apache.bval.jsr303.ConfigurationImpl;
+import org.apache.bval.jsr303.xml.PropertyType;
+import org.apache.bval.jsr303.xml.ValidationConfigType;
+import org.apache.bval.jsr303.xml.ValidationParser;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.OsgiService;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.naming.ResourceSource;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * GBean that provides access to ValidatorFactory instances for a module 
+ * <p/>
+ * This GBean is used to generate ValidatorFactory instances.  This will use  
+ * a validation.xml config file, if it exists, or create a default bean validation 
+ * factory. 
+ *
+ * @version $Rev$ $Date$
+ */
+
+@GBean(j2eeType = NameFactory.VALIDATOR_FACTORY)
+@OsgiService
+public class ValidatorFactoryGBean implements GBeanLifecycle, ResourceSource<ValidationException> {
+    private static final Logger log = LoggerFactory.getLogger(ValidatorFactoryGBean.class);
+
+    private final String objectName;
+    private final Bundle bundle;
+    private final ClassLoader classLoader;
+    // module validation configuration 
+    private String validationConfig; 
+    // The created ValidatorFactory 
+    private ValidatorFactory factory; 
+
+    /**
+     * Construct an instance of ValidatorFactoryGBean
+     * <p/>
+     * @param validationConfig    the location of validation configuration xml file in the bundle
+     */
+    public ValidatorFactoryGBean(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
+                                 @ParamSpecial(type = SpecialAttributeType.bundle) Bundle bundle,
+                                 @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader,
+                                 @ParamAttribute(name = "validationConfig") String validationConfig) {
+        this.objectName = objectName;
+        this.bundle = bundle;
+        this.classLoader = classLoader;
+        this.validationConfig = validationConfig;
+    }
+
+    @Override
+    public Object $getResource() throws ValidationException {
+        // return the current factory instance 
+        return getFactory(); 
+    }
+    
+    
+    /**
+     * Retrieve (and potentially create) the ValidatorFactory 
+     * instance for this module. 
+     * 
+     * @return A ValidatorFactory instance configured using the validation xml for this module.
+     */
+    public ValidatorFactory getFactory() {
+        if (factory == null) {
+            if (validationConfig == null) {
+                // No validation configuration specified. Create default instance.
+                factory = Validation.buildDefaultValidatorFactory();
+            } else {
+                // Parse the validation xml
+            	// TODO: Should this processing happen at build time and raise deployment exceptions?
+                ValidationConfigType validationConfigType = null;
+                URL schemaUrl = ValidationParser.class.getClassLoader().getResource("META-INF/validation-configuration-1.0.xsd");
+                SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+                try {
+                    Schema schema = sf.newSchema(schemaUrl);
+                    JAXBContext jc = JAXBContext.newInstance(ValidationConfigType.class);
+                    Unmarshaller unmarshaller = jc.createUnmarshaller();
+                    unmarshaller.setSchema(schema);
+                    StreamSource stream = new StreamSource(bundle.getEntry(validationConfig).openStream());
+                    JAXBElement<ValidationConfigType> root = unmarshaller.unmarshal(stream, ValidationConfigType.class);
+                    validationConfigType = root.getValue();
+                } catch(Throwable t) {
+                    throw new ValidationException("Unable to create module ValidatorFactory instance", t);
+                }
+                // Apply the configuration
+                // TODO: Ideally this processing should happen in BVal code. But, the ValidationParser loads the validation xml and
+                //       mapping files using the classloader and these files are not always available through the classloader in case
+                //       of Java EE (for e.g., WEB-INF/validation.xml)
+                ConfigurationImpl config = (ConfigurationImpl) Validation.byDefaultProvider().configure();
+                applyConfig(validationConfigType, config);
+                config.ignoreXmlConfiguration();
+                // Create the factory instance
+                factory = config.buildValidatorFactory();
+            }
+        }
+        return factory; 
+    }
+
+    @SuppressWarnings("unchecked")
+    private void applyConfig(ValidationConfigType xmlConfig, ConfigurationImpl target) {
+        String providerClassName = xmlConfig.getDefaultProvider();
+        if (providerClassName != null) {
+            Class<? extends ValidationProvider<?>> clazz;
+            try {
+                clazz = (Class<? extends ValidationProvider<?>>) classLoader.loadClass(providerClassName);
+                target.setProviderClass(clazz);
+                log.info("Using " + providerClassName + " as validation provider.");
+            } catch (ClassNotFoundException e) {
+                log.warn("Unable to load provider class "+providerClassName, e);
+            }
+        }
+        String messageInterpolatorClass = xmlConfig.getMessageInterpolator();
+        if (target.getMessageInterpolator() == null) {
+            if (messageInterpolatorClass != null) {
+                Class<MessageInterpolator> clazz;
+                try {
+                    clazz = (Class<MessageInterpolator>) classLoader.loadClass(messageInterpolatorClass);
+                    target.messageInterpolator(clazz.newInstance());
+                } catch (Exception e) {
+                    log.warn("Unable to set "+messageInterpolatorClass+ " as message interpolator.", e);
+                }
+                log.info("Using " + messageInterpolatorClass + " as message interpolator.");
+            }
+        }
+        String traversableResolverClass = xmlConfig.getTraversableResolver();
+        if (target.getTraversableResolver() == null) {
+            if (traversableResolverClass != null) {
+                Class<TraversableResolver> clazz;
+                try {
+                    clazz = (Class<TraversableResolver>) classLoader.loadClass(traversableResolverClass);
+                    target.traversableResolver(clazz.newInstance());
+                } catch (Exception e) {
+                    log.warn("Unable to set "+traversableResolverClass+ " as traversable resolver.", e);
+                }
+                log.info("Using " + traversableResolverClass + " as traversable resolver.");
+            }
+        }
+        String constraintFactoryClass = xmlConfig.getConstraintValidatorFactory();
+        if (target.getConstraintValidatorFactory() == null) {
+            if (constraintFactoryClass != null) {
+                Class<ConstraintValidatorFactory> clazz;
+                try {
+                    clazz = (Class<ConstraintValidatorFactory>) classLoader.loadClass(constraintFactoryClass);
+                    target.constraintValidatorFactory(clazz.newInstance());
+                } catch (Exception e) {
+                    log.warn("Unable to set "+constraintFactoryClass+ " as constraint factory.", e);
+                }
+                log.info("Using " + constraintFactoryClass + " as constraint factory.");
+            }
+        }
+        for (PropertyType property : xmlConfig.getProperty()) {
+            log.debug("Found property '" + property.getName() + "' with value '" + property.getValue() + "' in " + validationConfig);
+            target.addProperty(property.getName(), property.getValue());
+        }
+        for (JAXBElement<String> mappingFileNameElement : xmlConfig.getConstraintMapping()) {
+            String mappingFileName = mappingFileNameElement.getValue();
+            log.debug("Opening input stream for " + mappingFileName);
+            InputStream in = null;
+            try {
+                in = bundle.getEntry(mappingFileName).openStream();
+                if (in == null) {
+                    throw new ValidationException("Unable to open input stream for mapping file " + mappingFileName);
+                }
+            } catch (IOException e) {
+                throw new ValidationException("Unable to open input stream for mapping file " + mappingFileName, e);
+            }
+            target.addMapping(in);
+        }
+    }
+
+    public void doStart() throws Exception {
+        log.debug("Starting " + objectName); 
+        // if there is an explicit configuration provided, we need to process 
+        // this now in case there are exceptions
+        if (validationConfig != null) {
+            getFactory();
+        }
+    }
+
+    public void doStop() throws Exception {
+        factory = null;
+        log.debug("Stopped " + objectName);
+    }
+
+    public void doFail() {
+        factory = null;
+        log.warn("Failed " + objectName);
+    }
+
+    public String getObjectName() {
+        return objectName;
+    }
+
+    public boolean isStateManageable() {
+        return false;
+    }
+
+    public boolean isStatisticsProvider() {
+        return false;
+    }
+
+    public boolean isEventProvider() {
+        return false;
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?rev=993482&r1=993481&r2=993482&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java Tue Sep  7 19:05:44 2010
@@ -104,6 +104,8 @@ public class NameFactory {
     public static final String APP_CLIENT = "AppClient";
     public static final String PERSISTENCE_UNIT = "PersistenceUnit";
     public static final String PERSISTENCE_UNIT_MODULE = "PersistenceUnitModule";
+    public static final String VALIDATOR_FACTORY = "ValidatorFactory";
+    public static final String VALIDATOR_FACTORY_MODULE = "ValidatorFactoryModule";
     //jsr 88 configurer
     public static final String DEPLOYMENT_CONFIGURER = "DeploymentConfigurer";
     public static final String CONFIGURATION_STORE = "ConfigurationStore";

Modified: geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml?rev=993482&r1=993481&r2=993482&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml Tue Sep  7 19:05:44 2010
@@ -69,6 +69,9 @@
             <pattern>
                 <name>EJBBuilder</name>
             </pattern>
+            <pattern>
+                <name>BValModuleBuilderExtension</name>
+            </pattern>
         </references>
         <reference name="ResourceEnvironmentSetter">
             <name>ResourceRefBuilder</name>