Table of Contents
The diagram above presents an overview of the
interface. For a complete treatment of the
EntityManager API, see the
Javadoc documentation. Methods whose parameter signatures consist of
an ellipsis (...) are overloaded to take multiple parameter types.
OpenJPA extends the standard
EntityManager interface with
interface to provide additional functionality.
EntityManager is the primary interface used by
application developers to interact with the JPA runtime. The methods
EntityManager can be divided into the following
Entity lifecycle management.
Entity identity management.
public EntityTransaction getTransaction ();
EntityManager has a one-to-one relation with an
instance. In fact, many vendors use a single class to implement both the
interfaces. If your application requires multiple concurrent
transactions, you will use multiple
You can retrieve the
EntityTransaction associated with an
EntityManager through the
method. Note that most most JPA implementations can
integrate with an application server's managed transactions. If you take
advantage of this feature, you will control transactions by declarative
demarcation or through the Java Transaction API (JTA) rather than through the