As you probably know, the Java Persistence API (JPA) is the object relational mapping (ORM) specification for persisting Java objects into relational databases. It leverages Enterprise JavaBeans (EJB 3.0) and draws on the concepts and standards in leading persistence frameworks such as TopLink and Hibernate, as well as on earlier EJB container-managed persistence. How exactly does it pull all these ideas and technologies together?
Jeyarani Venkatasamy’s Java Boutique article JPA for Simplified Persistence: An Introduction to the Java Persistence API breaks down the basics of JPA to provide a comprehensive introduction to this POJO-based standard. He writes:
One of the great benefits of JPA is that it is an independent API and can nicely integrate with J2EE / Java EE as well as J2SE / Java SE applications. JPA uses metadata to map persistence objects to database tables, and it supports a SQL-like query language to ease the process of querying the database.
The article not only introduces JPA — its benefits and architecture — but also uses a demo application to explain how to it works and how to implement it.