Chapter 8. Understanding Java persistence

 

This chapter covers

  • Managing entities
  • Using transactions
  • Choosing between JPA and Hibernate

Java persistence is the mechanism by which object-based entities are translated between the Java runtime environment and a relational database. It’s undoubtedly the most popular feature of the Java EE platform, perhaps even the Java language. This popularity can be attributed to the fact that persisting data is central to nearly all enterprise applications. For that reason, persistence is a core part of Seam. In fact, you can’t get very deep into a Seam application without encountering it. As you’re probably aware, you’ve been using Java persistence in the sample application since chapter 2—though solely the Java Persistence API (JPA) variety.

8.1. Java persistence principles

8.2. Entities and relationships

8.3. The persistence unit

8.4. The persistence manager

8.5. Transactions

8.6. Managing persistence in the enterprise

8.7. Choosing between JPA and Hibernate

8.8. Summary