Validation

Validation is a process that helps you ensure that the Java objects follow the constraints defined by the XML schema. JAXB provides a validator interface that enables validation. The following table describes the three types of validation.

Type

Description

Unmarshal-time

Enables generation of validation errors during unmarshalling

On-demand

Calls the validate method on a Validator instance to perform on-demand validation of the Java objects

Fail-fast

Notifies applications about constraint violations that result due to the changes in the Java objects during runtime

 

The graphic shows the JAXB architecture.
Click the Next button to continue.