|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JTAPersistenceContextManager
| Method Summary | |
|---|---|
javax.persistence.EntityManager |
getExistingPersistenceContext(javax.persistence.EntityManagerFactory emf)
Get the existing Transaction scoped PersistenceContext for this transaction and persistence unit |
boolean |
isTransactionActive()
Determine whether there is an active transaction |
void |
manageExistingPersistenceContext(javax.persistence.EntityManagerFactory emf,
javax.persistence.EntityManager em)
Make the supplied EntityManager the current persistence context for this transaction. |
| Method Detail |
|---|
javax.persistence.EntityManager getExistingPersistenceContext(javax.persistence.EntityManagerFactory emf)
throws javax.persistence.TransactionRequiredException
emf - The PersistenceUnit to get a PersistenceContext for
javax.persistence.TransactionRequiredException - if there is no current transaction
void manageExistingPersistenceContext(javax.persistence.EntityManagerFactory emf,
javax.persistence.EntityManager em)
throws javax.persistence.TransactionRequiredException,
java.lang.IllegalStateException
EntityManager the current persistence context for this transaction.
The JTAPersistenceContextManager will call EntityManager.joinTransaction()
but will not close the EntityManager when the transaction commits.
After a successful call to this method, getExistingPersistenceContext(EntityManagerFactory)
will return the EntityManager em
emf - The persistence unitem - The persistence context that will be the "managed" persistence context for the current
transaction
javax.persistence.TransactionRequiredException - if there is no active transaction
java.lang.IllegalStateException - if there is already a persistence context associated with this transactionboolean isTransactionActive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||