Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Low-Code Development: Learn the concepts of low code, features + use cases for professional devs, and the low-code implementation process.

E-Commerce Development Essentials: Considering starting or working on an e-commerce business? Learn how to create a backend that scales.

Getting Started With Jenkins: Learn fundamentals that underpin CI/CD, how to create a pipeline, and when and where to use Jenkins.

What are the differences between JAXB 1.0 and JAXB 2.0

· Interview

What are the differences between JAXB 1.0 and JAXB 2.0?

  1. JAXB 1.0 only requires JDK 1.3 or later. JAXB 2.0 requires JDK 1.5 or later.
  2. JAXB 2.0 makes use of generics and thus provides compile time type safety checking thus reducing runtime errors.
  3. Validation is only available during marshalling in JAXB 1.0. Validation is also available during unmarshalling in JAXB 2.0.
  4. Termination occurs in JAXB 1.0 when a validation error occurs. In JAXB 2.0 custom ValidationEventHandlers can be used to deal with validation errors.
  5. JAXB 2.0 uses annotations and supports bi-directional mapping.
  6. JAXB 2.0 generates less code.
  7. JAXB 1.0 does not support key XML Schema components like anyAttribute, key, keyref, and unique. It also does not support attributes like complexType.abstract, element.abstract, element.substitutionGroup, xsi:type, complexType.block,, element.block,, schema.blockDefault, and schema.finalDefault. In version 2.0, support has been added for all of these schema constructs.




Opinions expressed by DZone contributors are their own.