Skip Headers
Dali Java Persistence Tools User Guide
Release 3.2
Release 3.2
  PDF
PDF
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Understanding OR mappings
 
Next
Understanding Java Architecture for XML Binding
 

Understanding Java Persistence API

The Java Persistence API (JPA) part of the Java EE EJB 3.0 specification, simplifies Java persistence. It provides an object-relational mapping approach that lets you declaratively define how to map Java objects to relational database tables in a standard, portable way. JPA works both inside a Java EE application server and outside an EJB container in a Java Standard Edition (Java SE) application. An application written according to the JPA specification is scalable, transactional, and secure.

Related tasks

Related concepts

The persistence.xml file

The JPA specification requires the use of a persistence.xml file for deployment. This file defines the database and entity manager options, and may contain more than one persistence unit.

To enable you to easily edit this information, Dali provides the persistence.xml Editor. Alternatively, you can use the Eclipse XML Editor to create and maintain this information. See "Managing the persistence.xml file" for more information.


Tip:

To work with multiple persistence units, comment out all but one persistence unit in persistence.xml.


Related tasks

Related reference

The orm.xml file

Although the JPA specification emphasizes the use of annotations to specify persistence, you can also use the orm.xml file to store this metadata. Dali enables you to create a stub orm.xml file for a JPA project using the Create ORM Mapping File wizard. See "Managing the orm.xml file" for more information.


Note:

The metadata must match the XSD specification of your selected JPA implementation.


Dali provides comprehensive support for configuring XML mapping files through the JPA Details view (for orm.xml) that is nearly identical to the annotation-based configuration in the Java source. Alternatively, you can also use the Eclipse XML Editor to create and maintain the metadata information in orm.xml.

Related tasks