complexType persistence-unit-refType

complexType {http://java.sun.com/xml/ns/javaee}persistence-unit-refType

Abstractfalse (This can be used in an instance)
Target Namespacehttp://java.sun.com/xml/ns/javaee
Declared Namespacesxmlns:javaee=http://java.sun.com/xml/ns/javaee
xmlns:xsd=http://www.w3.org/2001/XMLSchema


Source

<xsd:complexType name="persistence-unit-refType">
    <
xsd:annotation>
        <
xsd:documentation>
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>


Documentation

	  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>


complexType persistence-unit-refType


Stylus Studio XML Schema Library Home
Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio®, a product from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2006 All Rights Reserved.