Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The Java Persistence API (JPA, http://jcp.org/en/jsr/summary?id=317) is a framework for automating the persistence of Java object instances into different storage mechanisms, most commonly to RDBMSs, in a manner that simplifies programming for the application developers.
In the following listing, you’ll see how you can use JPA to simplify our scenario. Keep in mind that we’re starting with a simple approach to illustrate the technology; we’ll improve it as we move through the sections and in future chapters.