<div><div><div>as mentioned before, we don&#39;t need a config to choose the right one. the right one is the one which provides an instance.</div><div><br></div><div>regards,</div><div>gerhard</div><div><br></div><br><br><div class="gmail_quote">

2012/1/4 Emmanuel Bernard <span dir="ltr">&lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
On 4 janv. 2012, at 14:54, Hardy Ferentschik wrote:<br>
<br>
&gt;<br>
&gt; On Jan 4, 2012, at 2:31 PM, Gerhard Petracek wrote:<br>
&gt;<br>
&gt;&gt; +1 -&gt; compared to the other suggestions: +1 for the service-loader approach because it allows jsr330 support without the need to add a new method to ValidatorContext as well as a new config entry and it&#39;s a std. java mechanism.<br>


&gt;<br>
&gt; Can we flesh this out a little. What would be the service interface?<br>
<br>
</div>I imagine something similar to the `InstanceProvider` I&#39;ve proposed.<br>
<br>
But I don&#39;t think I agree that a ServiceLoader + a new config to chose the right one is better than a new config pointing to the class + an API to provide the instance in the bootstrap. At least that&#39;s not consistent with our treatment of `TraversableResolver`, `MessageInterpolator` and `ConstraintValidatorFactory`. And we know that service loader files (META-INF/services/*) don&#39;t play well in modular environments esp OSGi.<br>


<div class="HOEnZb"><div class="h5">_______________________________________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
</div></div></blockquote></div><br></div></div>