[bv-dev] BVAL-265 - Expose settings defined in XML in the Configuration API

Hardy Ferentschik hardy at hibernate.org
Mon Jul 9 06:48:41 EDT 2012


On Jul 5, 2012, at 9:30 PM, Matt Benson wrote:

> Hmm, the foregoing discussion still sidesteps the main subject of this
> thread.  Aren't we saying that the current API implies this workflow:
> 
> * user calls Configuration#addMapping() 0..n times
> * user calls Configuration#buildValidatorFactory()
> * Configuration passes ConfigurationState to
> ValidationProvider#buildValidatorFactory()
> * ValidationProvider:
> ** queries ConfigurationState#getMappingStreams()
> ** sets up result for Configuration#getConfigurationSource()
> ** returns ValidatorFactory

I think you are wrong. Configuration reads validation.xml and provides the information
found via Configuration#getConfigurationSource(). 

In fact the Configuration implementation has to read validation.xml, because a custom validation provider could be defined.


--Hardy




More information about the beanvalidation-dev mailing list