<html><head></head><body bgcolor="#FFFFFF"><div>Indeed that's a typo for ConstraintViolationFactory.&nbsp;</div><div><br></div><div>In your approach, the object cannot use constructor injection, correct?</div><div>What does Spring Framework do in this case, raise an exception?<br><br>On 22 oct. 2011, at 01:33, Sebastian Thomschke &lt;<a href="mailto:sebastian.thomschke@web.de">sebastian.thomschke@web.de</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  
    Hi Emmanuel,<br>
    <br>
    the proposal talks about a ConstraintViolationFactory. I guess you
    meant ConstraintValidatorFactory?<br>
    <br>
    In OVal dependency injection works like this: OVal instantiates the
    validator (check) object itself and then passes it to an optional
    CheckInitializationListener which can wire required dependencies. So
    the DI system does not create the validator instances but configures
    the dependencies.<br>
    <br>
    For Spring DI in OVal you do:<br>
    &nbsp; ClassPathXmlApplicationContext ctx = new
    ClassPathXmlApplicationContext("SpringInjectorTest.xml",
    SpringInjectorTest.class);<br>
    &nbsp; AnnotationsConfigurer myConfigurer = new AnnotationsConfigurer();<br>
    &nbsp; myConfigurer.addCheckInitializationListener(new
    BeanInjectingCheckInitializationListener());<br>
    &nbsp; Validator v = new Validator(myConfigurer);<br>
    <br>
    Where the BeanInjectingCheckInitializationListener is implemented
    like:<br>
    <br>
    &nbsp; public class BeanInjectingCheckInitializationListener implements
    CheckInitializationListener {<br>
    &nbsp;&nbsp;&nbsp; public void onCheckInitialized(final Check newCheck) {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // wire the dependencies<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SpringInjector.get().inject(newCheck);<br>
    &nbsp;&nbsp; &nbsp;&nbsp; }<br>
    &nbsp; }<br>
    <br>
    For Bean Validation this could look like:<br>
    <pre><code>ValidatorFactory factory = Validation
  .byDefaultProvider()
  .configure()
  .addValidatiorInitializationListener(new SpringBeanInjectingValidatorInitializationListener()) 
  .buildValidatorFactory();

Regards,

Seb
</code></pre>
    <br>
    On 21.10.2011 23:55, Emmanuel Bernard wrote:
    <blockquote cite="mid:215E8EC6-3B81-48AC-8331-62D7DEEFC735@hibernate.org" type="cite">
      <pre wrap="">Hi team,
I've been thinking about BVAL-238 and came up with a first round of ideas and open questions.
It is available here <a class="moz-txt-link-freetext" href="http://beanvalidation.org/proposals/BVAL-238/">http://beanvalidation.org/proposals/BVAL-238/</a>

Please give me your feedback. I think this issue can be closed quite quickly.

I've also created a proposals section on the website that will contain such work in progress proposals before inclusion in the spec proper. Check out <a class="moz-txt-link-freetext" href="http://beanvalidation.org/proposals">http://beanvalidation.org/proposals</a>

On a side note, for casual website editing, you can use GitHub's `Edit this file` button (see <a class="moz-txt-link-freetext" href="https://github.com/beanvalidation/beanvalidation.org/blob/master/proposals/BVAL-238.md">https://github.com/beanvalidation/beanvalidation.org/blob/master/proposals/BVAL-238.md</a> ). It's not quite a wiki but that's pretty close. One thing you cannot do is create a new file unfortunately. Anyone that have asked for write access should see this button.

Emmanuel
_______________________________________________
beanvalidation-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a>
</pre>
    </blockquote>
    <br>
  

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>beanvalidation-dev mailing list</span><br><span><a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a></span><br></div></blockquote></body></html>