Use eclipselink.composite-unit to specify if the persistence unit is a composite persistence unit.
Values
Table 5-21 describes this persistence property's values.
Table 5-21 Valid Values for composite-unit
| Value | Description |
|---|---|
|
|
Persistence unit is a composite persistence unit. |
|
|
(Default) Persistence unit is not a composite persistence unit. |
Usage
The property must be specified in persistence.xml of a composite persistence unit. The composite persistence unit must contain all persistence units found in JAR files specified by the persistence.xml file.
|
If this property is passed to the |
Examples
Example 5-11 shows how to use this persistence property extension in the persistence.xml file.
Example 5-11 Using composite-unit in persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
<persistence-unit name="compositePu" transaction-type="JTA">
<provider>
org.eclipse.persistence.jpa.PersistenceProvider
</provider>
<jar-file>member1.jar</jar-file>
<jar-file>member2.jar</jar-file>
<properties>
<property name="eclipselink.composite-unit" value="true"/>
<property name="eclipselink.target-server" value="WebLogic_10"/>
</properties>
</persistence-unit>
</persistence>
See Also
For more information, see:
"Using Multiple Databases with a Composite Persistence Unit" in Solutions Guide for EclispeLink
"Composite Persistence Units"
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Composite_Persistence_Units