[cdi-dev] [JBoss JIRA] (CDI-241) Support dependency injection within Bean Validation constraint validators

Gunnar Morling (JIRA) jira-events at lists.jboss.org
Wed Jul 25 16:03:08 EDT 2012


Gunnar Morling created CDI-241:
----------------------------------

             Summary: Support dependency injection within Bean Validation constraint validators
                 Key: CDI-241
                 URL: https://issues.jboss.org/browse/CDI-241
             Project: CDI Specification Issues
          Issue Type: Feature Request
          Components: Java EE integration
            Reporter: Gunnar Morling


CDI should integrate with Bean Validation to support dependency injection within BV {{ConstraintValidator}} implementations.

>From the BV 1.1 [spec early draft|http://beanvalidation.org/1.1/spec/#bootstrapping-usageandcontainerexpectation]:

{quote}
Java EE should obey the rules defined above and enable Context and Dependency Injection (CDI) support to {{ValidatorFactory}} instances. In particular:

* Let {{Validator}} and {{ValidatorFactory}} object be injectable.
* Use a default {{ConstraintValidatorFactory}} implementation that returns CDI managed {{ConstraintValidator}} objects. The scope of these instances is dependent as the Bean Validation provider is responsible for them.
* Provide CDI managed instances of {{ConstraintValidatorFactory}}, {{MessageInterpolator}} and {{TraversableResovler}} if customized classes are requested in the XML deployment descriptor.
{quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the cdi-dev mailing list