Bean Validation: Practical Examples from a Real-World Java EE 7 Application

Presentation Date: 

Monday, September 29, 2014


JavaOne Conference, San Francisco, CA

JSR 303 / 349 introduced Bean Validation for providing a facility for validating objects, object members, methods, and constructors. In Java EE environments, Bean Validation integrates with Java EE containers and services to enable developers to easily define and enforce validation constraints, enabling the rules to be defined once, rather than wherever they need validation (such as at the UI or API layer). This session briefly introduces the standard concepts of Bean Validation annotations and demonstrates some practical techniques for more-complex needs, such as using custom validators and defining cross-field validation. Finally, it discusses how the speakers and their colleagues incorporated Bean Validation for the dynamic, data-driven rules of their application.

bean_validation.pdf865 KB