persistence, introduction to the java persistence api (2). the java ee 6 tutorial

The EntityManager Interface

Container-Managed Entity Managers

Application-Managed Entity Managers

Finding Entities Using the EntityManager

Managing an Entity Instance’s Lifecycle

Persisting Entity Instances

Removing Entity Instances

Synchronizing Entity Data to the Database

Persistence Units