Java Persistence API (JPA) is a specification for accessing, persisting, and managing data between Java objects or classes and a relational database. JPA is considered to be a standard approach for Object to Relational mapping (ORM) in Java.
JPA 2 is a work of the JSR 317 Expert Group. JPA 2 in itself is not a product, but is merely a set of interfaces which define how the persistence mechanism should work. There are a couple of open source and proprietary implementations of JPA 2 available. Hibernate, EclipseLink, and OpenJPA are prominent among them. We will be using Hibernate 3 as an implementation of the JPA 2 specification.
Hibernate is an object-relational-mapping library for java language, providing a framework for mapping an object-oriented-domain model to a relational database. Hibernate solves the problem of object-relational-impedance mismatch by replacing direct persistence-related database accesses with high-level object handling functions...