<div dir="ltr">@Gunnar<div><br></div><div>&gt; <span style="font-size:12.8px">You seem to suggest that a container somehow may make it that WEB-INF/validation.xml is exposed as META-INF/validation.xml to the BV provider. </span><span style="font-size:12.8px">That may theoretically be doable, but I don&#39;t think it&#39;s intended or suggested by the EE spec.</span></div><div><span style="font-size:12.8px">Some Java EE containers implemented this solution. If it&#39;s a custom hack or their interpretation of the spec ... I don&#39;t know.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">&gt; </span><span style="font-size:12.8px">My current inclination is to suggest exactly that to the Java EE leads,</span></div><div><span style="font-size:12.8px">A clarification is welcome :)</span></div><div><span style="font-size:12.8px"><br></span><div class="gmail_extra">Thanks</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 20, 2017 at 12:34 PM, Gunnar Morling <span dir="ltr">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Thanks for bringing up this issue, Nathan.</div><div><br></div><div>The Bean Validation spec expects the file to be at META-INF/validation.xml, no matter what type of application it is. I&#39;ll need to dig a bit deeper why the platform spec mentions WEB-INF/validation.xml.</div><span class="gmail-"><div><br></div><div>&gt; <span style="font-size:12.8px">the TCK uses the WEB-INF/validation.xml location</span><br></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">Do you have a pointer to this usage? Please send it to me off-list if it&#39;s somewhere within the EE TCK. The BV TCK itself uses META-INF/validation.xml.</span></div><span class="gmail-"><div><span style="font-size:12.8px"><br></span></div><div>&gt; <span style="font-size:12.8px">Therefore, I&#39;d expect a lot of users in the field to be using the WEB-INF location</span></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">I just tried WEB-INF/validation.xml in a plain WAR as well as a WAR within an EAR, and it wouldn&#39;t be applied either way (testing the BV reference implementation). Do you have a test case which shows successful usage of WEB-INF/validation.xml?</span></div><span class="gmail-"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">&gt; </span><span style="font-size:12.8px">Otherwise, the JavaEE Platform spec could be changed to no longer state WEB-INF/validation.xml</span></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">My current inclination is to suggest exactly that to the Java EE leads, as it seems like a glitch and I can&#39;t see how it&#39;d ever work with the RI. B</span><span style="font-size:12.8px">ut I&#39;ll synch with Emmanuel (former BV lead) to make sure I&#39;m not missing a piece.</span></div><div><br></div><div>@Marco,</div><span class="gmail-"><div><br></div><div><span style="font-size:12.8px">&gt; The implementation of &#39;WEB-INF/validation.xml&#39; for the web components and its </span></div><div><span style="font-size:12.8px">&gt; integration with Bean Validation is the full responsibility (EE.5.16.2) of the Java EE </span></div><div><span style="font-size:12.8px">&gt; Product Provider that declares it </span><br></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">You seem to suggest that a container somehow may make it that WEB-INF/validation.xml is exposed as META-INF/validation.xml to the BV provider. That may theoretically be doable, but I don&#39;t think it&#39;s intended or suggested by the EE spec.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Specifically, section EE.5.16 deals with the &quot;application client container&quot; property which the container must set depending on where this app is running (ACC vs. web/EJB container). It&#39;s not related to the retrieval of BV deployment descriptors.</span></div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>--Gunnar</div></font></span><div><div class="gmail-h5"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-17 20:03 GMT+01:00 Marco Molteni <span dir="ltr">&lt;<a href="mailto:moltenma@gmail.com" target="_blank">moltenma@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Nathan,</div><div><div><br></div><div>I agree that can be confusing for the developers that read the two documents but the specification of BV is, IMHO, consistent:</div><div><br></div><div>1.2. Specification Goals:  &#39;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&#39;.</div></div><div><br></div><div>And the JavaEE spec version 7 (and 8) :</div><div><div>&#39;EE.5.16.2 Java EE Product Provider’s Responsibilities</div><div>The Java EE Product Provider is responsible for providing the correct application client container property as required by this specification.&#39;</div></div><div><br></div><div><br></div><div><div>&#39;EE.5.17.1 Application Component Provider’s Responsibilities</div><div>[...] 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.&#39;</div></div><div><br></div><div><div>&#39;EE.5.17.2 Java EE Product Provider’s Responsibilities</div><div>[...] 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. [...]&#39;</div></div><div><br></div><div><br></div><div>The implementation of &#39;WEB-INF/validation.xml&#39; 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>The Bean Validation doesn&#39;t have to worry (or know) about the existence of a web component or a web configuration directory, it&#39;s out of its scope.</div><div>The correct configuration and communication between these (Web and BC) and other components is regulated by the container (EE.2.4).</div><div><br></div><div>The documents are (maybe) confusing but correct, in my opinion.</div><div><br></div><div>Regards</div><div><br></div><div>Marco</div><div> </div><br><div><blockquote type="cite"><div><div class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676h5"><div>Am 15.03.2017 um 17:39 schrieb Nathan Mittlestat &lt;<a href="mailto:nmittles@gmail.com" target="_blank">nmittles@gmail.com</a>&gt;:</div><br class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266Apple-interchange-newline"></div></div><div><div><div class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676h5"><div dir="ltr"><div>Hi All,<br></div><div><br>One area I&#39;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&#39;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&#39;d expect a lot of users in the field to be using the WEB-INF location.<br><br>The Bean Validation spec has the following section (page 206):<br>Unless explicitly ignored by calling Configuration.ignoreXMLConfigu<wbr>ration(), a Configuration takes into<br>account the configuration available in META-INF/validation.xml. This configuration file is optional but<br>can be used by applications to refine some of the Bean Validation behavior. If more than one META-<br>INF/validation.xml file is found in the classpath, a ValidationException is raised.<br><br>In contrasts the JavaEE Platform spec has (page 127 of JavaEE 7):<br>In order to customize the returned ValidatorFactory, an EJB, web or<br>application client module may specify a Bean Validation XML deployment<br>descriptor. The name of the descriptor is WEB-INF/validation.xml for web<br>modules and META-INF/validation.xml for all other types of modules.<div class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-yj6qo gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-ajU"><div class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-ajR" id="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-:qh"><img class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-ajT"></div></div><span class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-HOEnZb gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-adL"><font color="#888888"><br><br><br></font></span></div><span class="gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-HOEnZb gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-adL"><font color="#888888">--Nathan</font></span></div></div></div>
______________________________<wbr>_________________<br>beanvalidation-dev mailing list<br><a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a></div></blockquote></div><br></div><br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br></blockquote></div><br></div></div></div>