Package org.apache.geronimo.bval

Examples of org.apache.geronimo.bval.ValidatorFactoryResourceReference


            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 ValidatorFactoryResourceReference(filter, ValidatorFactory.class.getName()), ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), 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(), ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
        }
        put("java:comp/Validator", new DefaultValidatorReference(), ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.bval.ValidatorFactoryResourceReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.