On Tue, Mar 18, 2014 at 1:01 PM, Michael Blyakher
<michael.blyak...@gmail.com> wrote:
> Hi All,
>
> Thanks for the quick replies, and apologies for not being more specific - I
> was quoting the EE 7 Platform spec as I am particularly interested in using
> the bval 1.1 implementation that hasn't been officially released yet.
>
> But from what I am hearing, it is the responsibility of an EE server to
> handle the WEB-INF case. I can see how this is possible for the 1.0
> implementation, as the server can parse the validation.xml itself and
> bootstrap the configuration through the validation spec API's. How would
> this be done for the current 1.1 implementation in the bval-1.1 branch in
> the repository? I don't see how the values for the "executable-validation"
> element could be provided to the impl through the validation spec API's.
>

Well, the 
http://bval.apache.org/mvnsite/bval-jsr303/apidocs/org/apache/bval/jsr303/ApacheValidatorConfiguration.Properties.html#VALIDATION_XML_PATH
property can be used to point to a different resource on the
classpath, but I can't find any mechanism that could be used to hook
up WEB-INF/validation.xml, and I can't find how TomEE does it, so
AFAICT you have indeed found what I consider a problem. Off the top of
my head I think we could solve it by adding a simple SPI to discover
the default validation configuration resource. Thoughts?

Matt

> Thanks,
> Michael
>
>
> On Tue, Mar 18, 2014 at 12:13 PM, Romain Manni-Bucau
> <rmannibu...@gmail.com>wrote:
>
>> Hi
>>
>> Bval only looks in META-INF but TomEE for instance (more generally EE
>> servers) handles WEB-INF case.
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014-03-18 17:50 GMT+01:00 Michael Blyakher <michael.blyak...@gmail.com>:
>> > Hi,
>> >
>> > Where is the validation.xml supposed to be for a web archive? The bval
>> > spec's only indicate the "META-INF/validation.xml" location, but the EE
>> > platform spec indicates that for a web archive this location must be
>> > "WEB-INF/validation.xml".
>> >
>> > EE.5.17 - "The name of the descriptor is WEB-INF/validation.xml for web
>> > modules and META-INF/validation.xml for all other types of modules."
>> >
>> > Given this, I don't see anywhere in the bval 1.0 or 1.1 code that handles
>> > this. Am I missing something or does this implementation not handle this
>> > case for web archives?
>> >
>> > Thanks,
>> > Michael
>>

Reply via email to