What you suggest seems sound however it would force us to generated different meta configuration files depending on which server we deploy to specify the correct default provider of the server we are deploying to or we could choose to use hibernate validator as default provider which should solve the issue. Also from what I've read in the thread you linked to classloader issues could arise having the BV provider in the war file meaning further customizations will be needed. (I'm a big fan of keeping it simple and flexible.) I suspect splitting the constraints into a seperate module might be possible and would eliminate any such issues and avoid any extra providers being registered. I can see there are workarounds for all of these issues but it just feels it would all be simpler and more portable splitting the implementation of the bean validation api and any custom constraints. In my opinion conceptually they don't belong in the same module. What's your view on this?
|