lundi 13 avril 2015

Bean Validation using complex business logic and remote service calls


Vote count:

0




I am implementing for a web application an input validation which is fairly complex and should take in input an ID and will call several other systems in order to check whether this ID is a valid on or not before persisting an object containing this id. I was thinking to use bean validation, but then I found myself creating a bean specifically for allowing this validation to take place. In fact I need to give my validator not only the ID but also some context information in order to make my remote service calls.


Do you think bean-validation is always the right place to put validation, even if it's complex and requires context outside the scope of the Bean to validate?


Would be a Spring service which implement the business logic validation rules a better choice?


Or maybe other validators (Hibernate, Spring) could deal with my use case better?


What are best practices around complex validation with Bean validation?



asked 1 min ago







Bean Validation using complex business logic and remote service calls

Aucun commentaire:

Enregistrer un commentaire