Java Validation XML vs Beans

ermir

New Member
We are building a new Java EE project. We are using JAX-RS to provide an API, and MongoDB to provide storage with Morphia. A question has arisen concerning the validation of input data.On the one hand we can annotate our entities with JAXB XML metadata which can produce an XSD schema through schemagen.On the other hand we can annotate our entities with validation metadata with JSR-303.An awkward question from someone lacking experience: are there reasons to use one over the other, or are both used in practice?
 
Back
Top