<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="">WebLogic, according to the documentation, supports WEB-INF/validation.xml</div><div class=""><a href="http://docs.oracle.com/cd/E24329_01/web.1211/e24368/overview.htm#WLPRG715" class="">http://docs.oracle.com/cd/E24329_01/web.1211/e24368/overview.htm#WLPRG715</a></div><div class=""><br class=""></div><div class=""><div class="">'Validation descriptors are named validation.xml and are packaged in the META-INF directory, except for Web modules, where the descriptor is packaged in the WEB-INF directory.'</div></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">Am 20.03.2017 um 17:29 schrieb Marco Molteni &lt;<a href="mailto:moltenma@gmail.com" class="">moltenma@gmail.com</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">TomEE: there was a debate around this problem (where to put the validation.xml) in the BVal mailing list (<a href="https://www.mail-archive.com/dev@bval.apache.org/msg00361.html" class="">https://www.mail-archive.com/dev@bval.apache.org/msg00361.html</a>).<br class=""></div><div class=""><br class=""></div><div class="">I quickly checked the sources of Glassfish RI (via Payara) and threre is an old TODO (waiting end of the discussions around BV) in the code that creates the default configuration for BV.</div><div class="">In WAS I found (in the doc, only quick look) a reference only to META-INF/persistence.xml</div><div class=""><br class=""></div><div class="">I start to think that the support for WEB-INF is more an exception than the rule.</div><div class=""><br class=""></div><div class="">I agree that there is a lot of confusion around: META-INF, WEB-INF and 'WEB-INF/classes/META-INF' (<a href="http://stackoverflow.com/questions/8701482/bean-validation-validation-xml-ignored" class="">http://stackoverflow.com/questions/8701482/bean-validation-validation-xml-ignored</a>).</div><div class=""><br class=""></div><div class="">Happy to help or investigate more if needed.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Mar 20, 2017 at 4:51 PM, Gunnar Morling <span dir="ltr" class="">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank" class="">gunnar@hibernate.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><span class="">2017-03-20 13:24 GMT+01:00 Marco Molteni <span dir="ltr" class="">&lt;<a href="mailto:moltenma@gmail.com" target="_blank" class="">moltenma@gmail.com</a>&gt;</span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">@Gunnar<span class=""><div class=""><br class=""></div><div class="">&gt;&nbsp;<span style="font-size:12.8px" class="">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.&nbsp;</span><span style="font-size:12.8px" class="">That may theoretically be doable, but I don't think it's intended or suggested by the EE spec.</span></div></span><div class=""><span style="font-size:12.8px" class="">Some Java EE containers implemented this solution. If it's a custom hack or their interpretation of the spec ... I don't know.</span></div></div></blockquote><div class=""><br class=""></div></span><div class="">Do you know which containers support this?&nbsp;</div><div class=""><div class="h5"><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><span class=""><div class=""><span style="font-size:12.8px" class="">&gt;&nbsp;</span><span style="font-size:12.8px" class="">My current inclination is to suggest exactly that to the Java EE leads,</span></div></span><div class=""><span style="font-size:12.8px" class="">A clarification is welcome :)</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span><div class="gmail_extra">Thanks</div><div class=""><div class="m_-475653335395456264h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Mar 20, 2017 at 12:34 PM, Gunnar Morling <span dir="ltr" class="">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank" class="">gunnar@hibernate.org</a>&gt;</span> wrote:<br class=""><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" class="">Hi,<div class=""><br class=""></div><div class="">Thanks for bringing up this issue, Nathan.</div><div class=""><br class=""></div><div class="">The Bean Validation spec expects the file to be at META-INF/validation.xml, no matter what type of application it is. I'll need to dig a bit deeper why the platform spec mentions WEB-INF/validation.xml.</div><span class="m_-475653335395456264m_324664736092377036gmail-"><div class=""><br class=""></div><div class="">&gt;&nbsp;<span style="font-size:12.8px" class="">the TCK uses the WEB-INF/validation.xml location</span><br class=""></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div></span><div class=""><span style="font-size:12.8px" class="">Do you have a pointer to this usage? Please send it to me off-list if it's somewhere within the EE TCK. The BV TCK itself uses META-INF/validation.xml.</span></div><span class="m_-475653335395456264m_324664736092377036gmail-"><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class="">&gt;&nbsp;<span style="font-size:12.8px" class="">Therefore, I'd expect a lot of users in the field to be using the WEB-INF location</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div></span><div class=""><span style="font-size:12.8px" class="">I just tried WEB-INF/validation.xml in a plain WAR as well as a WAR within an EAR, and it wouldn'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="m_-475653335395456264m_324664736092377036gmail-"><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">&gt;&nbsp;</span><span style="font-size:12.8px" class="">Otherwise, the JavaEE Platform spec could be changed to no longer state WEB-INF/validation.xml</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div></span><div class=""><span style="font-size:12.8px" class="">My current inclination is to suggest exactly that to the Java EE leads, as it seems like a glitch and I can't see how it'd ever work with the RI. B</span><span style="font-size:12.8px" class="">ut I'll synch with Emmanuel (former BV lead) to make sure I'm not missing a piece.</span></div><div class=""><br class=""></div><div class="">@Marco,</div><span class="m_-475653335395456264m_324664736092377036gmail-"><div class=""><br class=""></div><div class=""><span style="font-size:12.8px" class="">&gt; The implementation of 'WEB-INF/validation.xml' for the web components and its&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&gt; integration with Bean Validation is the full responsibility (EE.5.16.2) of the Java EE&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&gt; Product Provider that declares it&nbsp;</span><br class=""></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div></span><div class=""><span style="font-size:12.8px" class="">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't think it's intended or suggested by the EE spec.</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Specifically, section EE.5.16 deals with the "application client container" property which the container must set depending on where this app is running (ACC vs. web/EJB container). It's not related to the retrieval of BV deployment descriptors.</span></div><span class="m_-475653335395456264m_324664736092377036gmail-HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">--Gunnar</div></font></span><div class=""><div class="m_-475653335395456264m_324664736092377036gmail-h5"><div class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-03-17 20:03 GMT+01:00 Marco Molteni <span dir="ltr" class="">&lt;<a href="mailto:moltenma@gmail.com" target="_blank" class="">moltenma@gmail.com</a>&gt;</span>:<br class=""><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" 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: &nbsp;'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="">&nbsp;</div><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676h5"><div class="">Am 15.03.2017 um 17:39 schrieb Nathan Mittlestat &lt;<a href="mailto:nmittles@gmail.com" target="_blank" class="">nmittles@gmail.com</a>&gt;:</div><br class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266Apple-interchange-newline"></div></div><div class=""><div class=""><div class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676h5"><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.&nbsp; The Bean Validation spec indicates the 
validation.xml is always at META-INF/validation.xml.&nbsp; 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.&nbsp; 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.&nbsp; 
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.ignoreXMLConfigu<wbr class="">ration(), 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="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-yj6qo m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-ajU"><div class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-ajR" id="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-:qh"><img class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-ajT"></div></div><span class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-HOEnZb m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-adL"><font color="#888888" class=""><br class=""><br class=""><br class=""></font></span></div><span class="m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-HOEnZb m_-475653335395456264m_324664736092377036gmail-m_-5403821960353451409gmail-m_-3142183346763634370m_4431824595843352676m_-7451719855524532266gmail-adL"><font color="#888888" class="">--Nathan</font></span></div></div></div>
______________________________<wbr class="">_________________<br class="">beanvalidation-dev mailing list<br class=""><a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank" class="">beanvalidation-dev@lists.jboss<wbr class="">.org</a><br class=""><a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank" class="">https://lists.jboss.org/mailma<wbr class="">n/listinfo/beanvalidation-dev</a></div></blockquote></div><br class=""></div><br class="">______________________________<wbr class="">_________________<br class="">
beanvalidation-dev mailing list<br class="">
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank" class="">beanvalidation-dev@lists.jboss<wbr class="">.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailma<wbr class="">n/listinfo/beanvalidation-dev</a><br class=""></blockquote></div><br class=""></div></div></div></div>
<br class="">______________________________<wbr class="">_________________<br class="">
beanvalidation-dev mailing list<br class="">
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank" class="">beanvalidation-dev@lists.jboss<wbr class="">.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailma<wbr class="">n/listinfo/beanvalidation-dev</a><br class=""></blockquote></div><br class=""></div></div></div></div></div>
<br class="">______________________________<wbr class="">_________________<br class="">
beanvalidation-dev mailing list<br class="">
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank" class="">beanvalidation-dev@lists.jboss<wbr class="">.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailma<wbr class="">n/listinfo/beanvalidation-dev</a><br class=""></blockquote></div></div></div><br class=""></div></div>
<br class="">______________________________<wbr class="">_________________<br class="">
beanvalidation-dev mailing list<br class="">
<a href="mailto:beanvalidation-dev@lists.jboss.org" class="">beanvalidation-dev@lists.<wbr class="">jboss.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/<wbr class="">mailman/listinfo/<wbr class="">beanvalidation-dev</a><br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>