EclipseLink Solutions Guide for EclipseLink
Release 2.7
  Go To Table Of Contents
 Search
 PDF

9 Using Multiple Databases with a Composite Persistence Unit

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.


NoteNote:

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

Sample

See the following EclipseLink examples for related information: