<xsd:complexType name="persistence-unit-refType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The persistence-unit-ref element contains a declaration
of Deployment Component's reference to a persistence unit
associated within a Deployment Component's
environment. It consists of:
- an optional description
- the persistence unit reference name
- an optional persistence unit name. If not specified,
the default persistence unit is assumed.
- optional injection targets
Examples:
<persistence-unit-ref>
<persistence-unit-ref-name>myPersistenceUnit
</persistence-unit-ref-name>
</persistence-unit-ref>
<persistence-unit-ref>
<persistence-unit-ref-name>myPersistenceUnit
</persistence-unit-ref-name>
<persistence-unit-name>PersistenceUnit1
</persistence-unit-name>
</persistence-unit-ref>
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="persistence-unit-ref-name" type="javaee:jndi-nameType">
<xsd:annotation>
<xsd:documentation>The persistence-unit-ref-name element specifies the name of a persistence unit reference; its value is the environment entry name used in Deployment Component code. The name is a JNDI name relative to the java:comp/env context.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="persistence-unit-name" type="javaee:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The Application Assembler(or BeanProvider) may use the following syntax to avoid the need to rename persistence units to have unique names within a Java EE application. The Application Assembler specifies the pathname of the root of the persistence.xml file for the referenced persistence unit and appends the name of the persistence unit separated from the pathname by #. The pathname is relative to the referencing application component jar file. In this manner, multiple persistence units with the same persistence unit name may be uniquely identified when the Application Assembler cannot change persistence unit names.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:group ref="javaee:resourceGroup"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType> |