[bv-dev] Support DI within constraint validators

Emmanuel Bernard emmanuel at hibernate.org
Wed Aug 22 08:34:48 EDT 2012


Of of the options is to have it defaulted to enabled. To disable validation or change the default group, @MethodValidated would be necessary.
Is that what the EE spec leads had in mind?

On 22 août 2012, at 13:23, Pete Muir wrote:

> BTW the Java EE spec leads were concerned about the @MethodValidated annotation being required at all.
> 
> On 22 Aug 2012, at 12:19, Emmanuel Bernard wrote:
> 
>> Yes, one of the consequences as you point out is that we will define the @MethodValidated contract in BV.
>> While I think it's a good thing, I want everyone to understand this consequence.
>> 
>> On 15 août 2012, at 22:56, Gunnar Morling wrote:
>> 
>>> Hi all,
>>> 
>>> based on an issue I recently filed, CDI lead Pete Muir started a
>>> thread on the integration of BV and CDI over on the CDI mailing list
>>> [1].
>>> 
>>> The general question is where this integration should be described. My
>>> first assumption was, that the Java EE platform spec. would be the
>>> right place for this is, but Java EE co-lead Bill Shannon pointed out
>>> [2] that the preferred approach is to have such integrations described
>>> in one of the involved technology specs.
>>> 
>>> And actually we're already doing this to some degree as of the BV 1.1
>>> early draft [3]. So I guess our descriptions there need just to be a
>>> bit more authoritative ("must" instead of "should" etc.) and specific.
>>> In section 3.7, the CDI spec. currently also mentions built-in beans
>>> for Validator and ValidatorFactory to be provided by a Java EE
>>> container. To consolidate the specs I tend to think that this section
>>> should be merged into BV section 5.5.7.1.
>>> 
>>> The same approach should probably also be taken for the description of
>>> triggering method validation under Java EE using the @MethodValidated
>>> annotation.
>>> 
>>> Any thoughts?
>>> 
>>> --Gunnar
>>> 
>>> [1] http://lists.jboss.org/pipermail/cdi-dev/2012-August/001978.html
>>> [2] http://lists.jboss.org/pipermail/cdi-dev/2012-August/002045.html
>>> [3] http://beanvalidation.org/1.1/spec/#d0e6698
>>> _______________________________________________
>>> beanvalidation-dev mailing list
>>> beanvalidation-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>> 
> 




More information about the beanvalidation-dev mailing list