<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Nathan,</div><div class=""><div class=""><br class=""></div><div class="">I agree that can be confusing for the developers that read the two documents but the specification of BV is, IMHO, consistent:</div><div class=""><br class=""></div><div class="">1.2. Specification Goals: 'The validation API developed by this JSR is not intended for use in any one tier or programming model. It is specifically not tied to either the web tier or the persistence tier'.</div></div><div class=""><br class=""></div><div class="">And the JavaEE spec version 7 (and 8) :</div><div class=""><div class="">'EE.5.16.2 Java EE Product Provider’s Responsibilities</div><div class="">The Java EE Product Provider is responsible for providing the correct application client container property as required by this specification.'</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">'EE.5.17.1 Application Component Provider’s Responsibilities</div><div class="">[...] The Application Component Provider may customize the ValidatorFactory and (indirectly) Validator instances by including a Bean Validation deployment descriptor inside a specific module of the application.'</div></div><div class=""><br class=""></div><div class=""><div class="">'EE.5.17.2 Java EE Product Provider’s Responsibilities</div><div class="">[...] These objects must be used to configure the default ValidatorFactory available at java:comp/ValidatorFactory in accordance with the bootstrapping APIs described by the Bean Validation specification. [...]'</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The implementation of 'WEB-INF/validation.xml' for the web components and its integration with Bean Validation is the full responsibility (EE.5.16.2) of the Java EE Product Provider that declares it .</div><div class="">The Bean Validation doesn't have to worry (or know) about the existence of a web component or a web configuration directory, it's out of its scope.</div><div class="">The correct configuration and communication between these (Web and BC) and other components is regulated by the container (EE.2.4).</div><div class=""><br class=""></div><div class="">The documents are (maybe) confusing but correct, in my opinion.</div><div class=""><br class=""></div><div class="">Regards</div><div class=""><br class=""></div><div class="">Marco</div><div class=""> </div><br class=""><div><blockquote type="cite" class=""><div class="">Am 15.03.2017 um 17:39 schrieb Nathan Mittlestat <<a href="mailto:nmittles@gmail.com" class="">nmittles@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi All,<br class=""></div><div class=""><br class="">One area I'd like to see a clarification
on in the spec is around the location of the validation.xml in a JavaEE
web container environment. The Bean Validation spec indicates the
validation.xml is always at META-INF/validation.xml. The JavaEE
Platform spec states WEB-INF/validation.xml should be used for web
modules. The entire Bean Validation spec has no mention of web modules,
and seems to mainly focus on JavaSE. However, it does mention
integration points such as CDI and JAX-RS, so I don't think it would be
out of line to clarify in the Bean Validation spec for web modules.
Otherwise, the JavaEE Platform spec could be changed to no longer state
WEB-INF/validation.xml, but previous JavaEE versions already include
this, and the TCK uses the WEB-INF/validation.xml location. Therefore,
I'd expect a lot of users in the field to be using the WEB-INF location.<br class=""><br class="">The Bean Validation spec has the following section (page 206):<br class="">Unless explicitly ignored by calling Configuration.<wbr class="">ignoreXMLConfiguration(), a Configuration takes into<br class="">account the configuration available in META-INF/validation.xml. This configuration file is optional but<br class="">can be used by applications to refine some of the Bean Validation behavior. If more than one META-<br class="">INF/validation.xml file is found in the classpath, a ValidationException is raised.<br class=""><br class="">In contrasts the JavaEE Platform spec has (page 127 of JavaEE 7):<br class="">In order to customize the returned ValidatorFactory, an EJB, web or<br class="">application client module may specify a Bean Validation XML deployment<br class="">descriptor. The name of the descriptor is WEB-INF/validation.xml for web<br class="">modules and META-INF/validation.xml for all other types of modules.<div class="gmail-yj6qo gmail-ajU"><div tabindex="0" class="gmail-ajR" id="gmail-:qh"><img src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif" class="gmail-ajT"></div></div><span class="gmail-HOEnZb gmail-adL"><font color="#888888" class=""><br class=""><br class=""><br class=""></font></span></div><span class="gmail-HOEnZb gmail-adL"><font color="#888888" class="">--Nathan</font></span></div>
_______________________________________________<br class="">beanvalidation-dev mailing list<br class=""><a href="mailto:beanvalidation-dev@lists.jboss.org" class="">beanvalidation-dev@lists.jboss.org</a><br class="">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</div></blockquote></div><br class=""></body></html>