javaee:persistence-unit-name

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.

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
id xsd:ID optional

Source

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

Sample