2.8.1. Transaction Association
public EntityTransaction getTransaction();
Every EntityManager has a one-to-one relation with an EntityTransaction instance.
In fact, many vendors use a single class to implement both the EntityManager and EntityTransaction interfaces.
If your application requires multiple concurrent transactions, you will use multiple EntityManagers.
You can retrieve the EntityTransaction associated with an EntityManager through the getTransaction method.
Note that 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 EntityTransaction.