as mentioned before, we don't need a config to choose the right one. the right one is the one which provides an instance.


2012/1/4 Emmanuel Bernard <>

On 4 janv. 2012, at 14:54, Hardy Ferentschik wrote:

> On Jan 4, 2012, at 2:31 PM, Gerhard Petracek wrote:
>> +1 -> 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's a std. java mechanism.
> Can we flesh this out a little. What would be the service interface?

I imagine something similar to the `InstanceProvider` I've proposed.

But I don'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's not consistent with our treatment of `TraversableResolver`, `MessageInterpolator` and `ConstraintValidatorFactory`. And we know that service loader files (META-INF/services/*) don't play well in modular environments esp OSGi.
beanvalidation-dev mailing list