public class JPAConnectionHolder
extends java.lang.Object
EntityManager
and current transaction. Instance of this class is used to store connection information in RPCManager
while handling Automatic Transactions.Modifier and Type | Method and Description |
---|---|
EntityManager | getEntityManager() Returns EntityManager for this connection. |
int | getOpCount() Returns count of operations executed. |
java.lang.Object | getTransaction() Returns current open transaction. |
void | increaseOpCount() Increases operations count by 1. |
void | setEntityManager(EntityManager em) Sets new EntityManager . |
void | setTransaction(java.lang.Object tx) Sets new transaction. |
public EntityManager getEntityManager()
EntityManager
for this connection.EntityManager
for this connection.public void setEntityManager(EntityManager em)
EntityManager
.em
- EntityManager
new entity manager.public java.lang.Object getTransaction()
Object
current transaction.public void setTransaction(java.lang.Object tx)
tx
- Object
new transaction.public int getOpCount()
int
executed operations count.public void increaseOpCount()