Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
 Search
 PDFComments
Comments


composite-unit

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

true

Persistence unit is a composite persistence unit.

false

(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.


NoteNote:

If this property is passed to the createEntityManagerFactory method or if it is set in system properties, it is ignored.)



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: