EclipseLink Dynamic MOXy introduces a new concept in JAXB development - the freedom to bootstrap a JAXBContext from a variety of metadata sources and use familiar JAXB APIs to marshal and unmarshal data, all without having actual compiled domain classes. This enables the metadata to be updated without worrying about updating and recompiling the previously-generated Java source code.

EclipseLink Dynamic MOXy introduces a new concept in JAXB development - the freedom to bootstrap a JAXBContext from a variety of metadata sources and use familiar JAXB APIs to marshal and unmarshal data, all without having actual compiled domain classes. This enables the metadata to be updated without worrying about updating and recompiling the previously-generated Java source code.

−

Instead of actual Java classes (e.g. Customer.class, Address.class, etc), the domain objects used in Dynamic MOXy will be subclasses of DynamicEntity. DynamicEntities offer a simple get(propertyName) / set(propertyName, propertyValue) API to manipulate their data. DynamicEntities have an associated DynamicType, which will be generated in memory when the metadata is parsed.

+

Instead of actual Java classes (e.g. '''Customer''', '''Address''', etc), the domain objects used in Dynamic MOXy will be subclasses of '''DynamicEntity'''. DynamicEntities offer a simple get(propertyName) / set(propertyName, propertyValue) API to manipulate their data. DynamicEntities have an associated DynamicType, which will be generated in memory when the metadata is parsed.

Revision as of 14:52, 18 June 2012

Contents

Overview

In this example we will compare dynamic JAXB to the more familiar static form. The main thing to note is that the use of JAXB is almost identical, the main difference is using the domain model.

EclipseLink Dynamic MOXy introduces a new concept in JAXB development - the freedom to bootstrap a JAXBContext from a variety of metadata sources and use familiar JAXB APIs to marshal and unmarshal data, all without having actual compiled domain classes. This enables the metadata to be updated without worrying about updating and recompiling the previously-generated Java source code.

Instead of actual Java classes (e.g. Customer, Address, etc), the domain objects used in Dynamic MOXy will be subclasses of DynamicEntity. DynamicEntities offer a simple get(propertyName) / set(propertyName, propertyValue) API to manipulate their data. DynamicEntities have an associated DynamicType, which will be generated in memory when the metadata is parsed.

Static JAXB

We will bootstrap our JAXBContext on annotated classes generated from an XML schema. If the XML schema were to change we would need to regenerate the classes.