Skip to main content
Jump to: navigation, search


  • Two or more persistence units could be combined into a single Composite persistence Unit.
  • Each composite members persistence unit keeps mapping its classes to its own database.
    • Therefore Composite persistence unit allows to map different entities to different data bases.
  • Below is an exaple of Composite persistence unit definition.
    • compositePu specifies transaction type and server platform.
    • It contains all persistence units defined in member1.jar and member2.jar files.
<persistence xmlns="" xmlns:xsi="" xsi:schemaLocation=" persistence_1_0.xsd" version="1.0">
    <persistence-unit name="compositePu" transaction-type="JTA">
            <property name="eclipselink.composite-unit" value="true"/>
            <property name="" value="WebLogic_10"/>

For more information about Composite persistence units please see the design doc.

Back to the top