With EclipseLink, you can expose multiple persistence units (each with unique sets of entity types) as a single persistence context by using a composite persistence unit. Individual persistence units that are part of this composite persistence unit are called composite member persistence units.
Note: EclipseLink also supports multiple databases through partitioning. See Chapter 10, "Scaling Applications in Clusters" for more information. |
This chapter includes the following sections:
Use Case
Users need to map expose multiple persistence units as a single persistence context within an application.
Solution
EclipseLink supports a "composite" persistence unit which can include multiple member persistence units.
Components
EclipseLink 2.4.2 or later.
Multiple databases.
Sample
See the following EclipseLink examples for related information: