Bean Validation integrates with the Java EE ecosystem and is provoked automatically by the related API. Nevertheless, Bean Validation can be provoked manually by the developer any time it is required. Discover how the Bean Validation API is integrated into the Java EE ecosystem API such as JPA, JAX-RS for RESTful web services, and JavaServer Faces. Find out where Bean Validation is used within the architecture of a typical Java EE ecosystem. What if the validation of a bean's data fails, what happens? In this video, discover the answer to this question and how to manage Bean Validation failures.
- [Narrator] Bean validation is a cross cutting…concern that integrates perfectly into the Java EE…ecosystem and can be used anywhere in the system…where validation of data is required.…Automatic provocation of Bean validation occurs…within a few key API's, they are Java Persistence API,…this API is used to read and write data to a database.…The JAX-RS API that is used to construct RESTful endpoints…that receive data from external sources.…JavaServer Pages where backing beans are used to…support web forms.…
Enterprise JavaBeans which are used in the business…layer and perform most of the applications logic.…Bean validation also integrates well with the context…and dependency injection API and provides an injectable…resource called validator.…The Bean validation instance is part of the…javax.validation bean validation API and is…always available for injection into a CDI aware bean,…which is likely to be pretty much everywhere…in your application.…If you want to use Bean validation anywhere else,…you do so by provoking it manually and later on…
In this course, you can journey through the many constraints that are built into the 2.0 version of the Bean Validation API, as well as the additional constraints provided by the Hibernate Validator 6.0. Learn Bean Validation in a practical way while you build a functioning web application. Instructor Alex Theedom shows how to extend the API with custom constraints and how to internationalize validation failure messages. Plus, learn advanced techniques such as cross-field and cross-parameter validation, and how Bean Validation integrates with other Java EE technologies such as JAX-RS, Java Persistence API (JPA), and JavaServer Faces (JSF). By the end of this course, you will have gained practical experience of using Bean Validation in a real web application and be able to implement what you have learned in your own Java applications.
- What is Bean Validation?
- Applying the built-in constraints
- Applying Hibernate constraints
- Designing custom constraint validators
- Managing and configuring validation failure messages
- Creating custom composite constraints
- Creating custom validation constraints
- Cross-field and cross-parameter validation
- Integration with RESTful web services (JAX-RS)