Dali Java Persistence Tools User Guide Release 3.2 Release 3.2 |
|
Understanding OR mappings |
Understanding Java Architecture for XML Binding |
Home > User Guide > Concepts > Understanding Java Persiste...
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
Java Persistence Architecture 2.0 specification (http://jcp.org/en/jsr/detail?id=317
)
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 |
Related tasks
Related reference
Section 8.2.1 "persistence.xml file" in the JPA Specification
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