The Java Persistence API (JPA) is the evolution of a number of frameworks in Java to provide a simple database access layer for plain Java objects (and, transitively, Scala objects). JPA was developed as part of the Enterprise Java Beans 3 (EJB3) specification, with the goal of simplifying the persistence model. You can read more about the standard at http://java.sun.com/javaee/overview/faq/persistence.jsp.Prior versions of Enterprise Java had used the Container Managed Persistence (CMP) framework, which required many boilerplate artifacts in the form of interfaces and XML descriptors. As part of the overarching theme of EJB3 to simplify and use convention over configuration, JPA uses sensible defaults and annotations heavily, while allowing for targeted overrides of behavior via XML descriptors. JPA also does away with many of the interfaces used in CMP and provides a single javax. persistence. EntityManager (EM) class for all persistence operations. An additional benefit is that JPA was designed so that it could be used both inside and outside of the enterprise container, and several projects (Hibernate, TopLink, JPOX, etc.) provide stand-alone implementations of EntityManager.
Unable to display preview. Download preview PDF.