Making hibernate validator scope provided would solve the problem nicely provided that that implementations is being used by the application server I'm running on.
As said this should work on GF. AFAIK WebSphere uses Apache BVAL, this thread may be of help for using Hibernate Validator instead in this scenario.
Can you confirm that if hibernate validator is included in the war it will be automatically registered as provider?
No, its not specified which provider will be chosen in case more than one provider is available.
I just don't feel right about being forced to register hibernate validator as a provider because we are using those constraints.
Actually it shouldn't even be required to use HV as the provider; the constraints should also work using another provider as long as HV is available on the classpath (as said some of the constraints depend on some HV internal classes).
|