6.2 persistence.xml

The following table describes the configuration of persistence.xml:

Tag nameOccurrence patternDescription
<persistence>OnceIndicates the root tag.

<persistence-unit>0 or more timesDefines the persistence unit.

<description>0 or onceDescribes the persistence unit.

<provider>0 or onceSpecifies the implementation class name of javax.persistence.spi.PersistenceProvider.

<jta-data-source>0 or onceSpecifies the references for the data source corresponding to the JTA transaction.

<non-jta-data-source>0 or onceSpecifies the references for the data source not corresponding to the JTA transaction.

<mapping-file>0 or more timesSpecifies the O/R mapping file.

<jar-file>0 or more timesCodes a JAR file name containing the entity class, embeddable class, and mappedsuper class.

<class>0 or more timesCodes the entity class, embeddable class, and mappedsuper class.

<exclude-unlisted-classes>0 or onceSpecifies the Persistence class.

<properties>0 or onceDefines the Cosminexus JPA Provider-specific properties.

<property>0 or more timesDefines various properties.

For details about the respective tags, see 6.2.1 Details of persistence.xml.

Organization of this section
6.2.1 Details of persistence.xml
6.2.2 Cosminexus JPA Provider-specific properties that can be specified in the <property> tag