Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/Examples/MOXy/MultipleBindingsFiles
Introduction
EclipseLink MOXy provides the ability to augment the annotation metadata with an XML bindings file. With this feature, EclipseLink can now process multiple bindings files from different locations, and create a merged set of metadata.
Sample use case: 1. Initial metadata is specified with a metadata file. 2. Second version modifies the metadata with an additional XML bindings file. 3. Subsequent versions continue to modify with additional bindings files.
With the metadata layered in this way a JAXBContext could be created to represent any version of the XML document.
Java Model
By using this in conjunction with a multi-tenant architecture, you can define a base set of metadata using one XML Bindings file, and then an additional file for each tenant. This example will be based on the object model from the EclipseLink Moxy Extensibile example.