On 26 October 2011 15:36, Emmanuel Bernard <emmanuel(a)hibernate.org> wrote:
IMHO, if the mechanism used to discover the ConstraintValidator
implementations is pluggable, it should work.
What do you have in mind? I don't mind having a pluggable discovery
mechanism but we need a standard way for a constraint implementor to expose
the fact that it implements validators for some constraints.
I've nothing special in mind. By pluggable I mean a way to override the
discovery mechanism like it's done with the ValidationProviderResolver. The
way used to specify the ConstraintValidator implementations will remain the
Because I'm not sure it's possible to have a mechanism which works in a
modular and non-modular world out of the box. For example, to make it work
with OSGi you'll have to be depend on the API. AFAIK, JBoss Modules allows
to import/export service resources.