Java™ Persistence with JPA

by Daoqi Yang, Ph.D.


Book Details

This book introduces Java Persistence API 2.0, the latest Java technology on persisting Java objects into relational databases. It is part of Java EE 6.0 standards, but can be used in both Java SE and Java EE applications. This is a new Java persistence standard based on object-relational mapping and utilizing object-oriented features of Java. It is expected to gradually replace JDBC and proprietary object-relational mapping frameworks for most Java applications with database access.

Using JPA (Java Persistence API) consists of two main tasks. The first task is to map Java classes and their fields/properties to relational database tables and columns. The second task is to manipulate (create, read, update, and delete) Java objects so that the underlying JPA implementation translates Java operations into JDBC calls and executes SQL statements behind the scene. JPA provides many easy-to-use features such as optimistic locking, pessimistic locking, lazy-loading, object caching, bean validation, and listeners for transactional events, which would be daunting tasks for a typical developer to implement when using JDBC. JPA makes software development fun and leads to improved productivity.

The book is written for Java developers and architects who know Java programming, but want to learn this new and standard technology. It is also aimed at experienced JPA developers who may use this book as a reference. This book tries to be easy to understand and provides many useful code examples. Also, it tries to be complete in JPA coverage. It has a special chapter on JPA design patterns and performance tuning. The author hopes to provide a valuable book for novice and experienced JPA developers.

See the author's website: for information on source code download and errata.


About the Author

Daoqi Yang, Ph.D.

Daoqi Yang is a Sun Certified Enterprise Architect, with 10 years of industrial software development experience in the metro Detroit area, and 5 years of academic research and teaching experience at Wayne State University and University of Minnesota. He received his Ph.D. from Purdue University, USA and B.S. from Shandong University, China. He is the author of the book: C++ and Object-Oriented Numeric Computing for Scientists and Engineers, and more than 20 research papers in international journals in the fields of applied mathematics and scientific computing. He is currently a solution architect at GMAC Financial Services, located in Southfield, Michigan.

Also by Daoqi Yang, Ph.D.

Java Persistence with JPA 2.1