Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents


Use eclipselink.composite-unit.member to specify if the persistence unit is a member composite persistence unit.


Table 5-22 describes this persistence property's values.

Table 5-22 Valid Values for composite-unit.member

Value Description


The persistence unit must be a member of a composite persistence unit and cannot be used as an independent persistence unit.


The persistence unit does not have to be a member of a composite persistence unit.


Setting this property to true indicates that the persistence unit has dependencies on other persistence units.


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

If this property is true, you may still create EntityManagerFactory, but it cannot be connected. Any attempt to create an entity manger will cause an exception.

Query Hint

When executing a native query on a composite persistence unit, use composite-unit.member to specify the name of the composite member persistence unit on which to execute the query.


Example 5-12 shows how to use this persistence property extension in the persistence.xml file.

Example 5-12 Using composite-unit.member in persistence.xml

Composite member persistence unit memberPu2 is defined in the member2.jar file. It has dependency on a class defined in member1.jar and cannot be used independently.

<persistence xmlns="" xmlns:xsi="" xsi:schemaLocation=" persistence_1_0.xsd" version="1.0">
    <persistence-unit name="memberPu2">
            <property name="eclipselink.composite-unit.member" value="true"/>
            <property name="" value="org.eclipse.persistence.platform.database.MySQLPlatform"/>

See Also

For more information, see: