Java Reference
In-Depth Information
• EclipseLink JPA
° Metadata annotations
° XML mapping metadata
° Entity identity
° Entity relationships
• EclispeLink JPA persistence unit properties
Specifying the EclipseLink persistence
provider
The minimum required configuration to start using the EclipseLink persistence
provider is to specify the persistence provider in the configuration file
persistence.
xml
. The persistence provider is specified in the
META-INF/persistence.xml
configuration file in the
provider
sub-element of the
persistence-unit
element.
<?xml version="1.0" encoding="Cp1252" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://
java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
xmlns="http://java.sun.com/xml/ns/persistence"
version="1.0">
<persistence-unit name="em">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>java:/app/jdbc/jdbc/OracleDBConnectionDS</jta-data-
source>
<class>model.Catalog</class>
<properties>
...
</properties>
</persistence-unit>
</persistence>
Search WWH ::
Custom Search