Hi Matt, Thanks for your inputs and agree with you, i do not want to bind my implementation with specific implementation. not sure if i am able to understand second part of your question completely. I am trying to provide a bridge between Struts2 and Bean validation API.While user submit there inputs, i am putting them through Validation using BV and if any kind of exception occurring, using Struts2 message API to read error messages and display them to UI.
Through this , idea is to let use specify which bean validation they want to use be it 1. Apache Bean validation 2. Hibernate Validator. I have plan to put Apache Bean Validation as Default validator in case use do not specify any preferences and want to use out of box functionality. Validation.byProvider(this.providerClass).configure().buildValidatorFactory(); where provide class can be configured by user or in case no value is specified by user, Apache BV will be picked as default implementation. Thanks Umesh On Tue, Oct 15, 2013 at 10:34 PM, Matt Benson <[email protected]> wrote: > ApacheValidatorConfiguration.Properties.VALIDATION_XML_PATH allows you to > override the location of validation.xml in a manner that is specific to > Apache BVal, but if you are creating some kind of plugin I'd hardly think > you'd want to tie yourself to a specific implementation of the Bean > Validation specification. What specific pattern of use are you trying to > support for the hypothetical plugin user? > > Matt > > > On Tue, Oct 15, 2013 at 11:48 AM, Umesh Awasthi <[email protected]>wrote: > >> I am trying to test bean validation for my plugin using XML based >> configuration and while doing i found that i need to place validation/xml >> file under >> >> META-INF/validation.xml inside my resource folder. >> For me this seems a little strange and who so ever want to use plugin >> needs to create META-INF folder inside resource folder. >> >> I am not sure, if my understanding is correct here and in case i am >> right, is there any specific reason to choose XML location like this? or >> can we customize this location >> >> -- >> With Regards >> Umesh Awasthi >> http://www.travellingrants.com/ >> >> >> > > -- With Regards Umesh Awasthi http://www.travellingrants.com/
