|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EntityTransaction
An EntityTransaction is associated with an EntityManager and is used to demarcate a transaction.
Use the EntityManager.getTransaction()
method to retreive the EntityManager's
EntityTransaction instance.
Each EntityManager and EntityTransaction are associated with the ObjectGrid
Session
. Transaction demarcation can be performed using either
the EntityTransaction or ObjectGrid Session.
EntityManager.getTransaction()
Method Summary | |
---|---|
void |
begin()
Begin a new transaction. |
void |
commit()
Commit the current transaction, flushing any uncommitted changes in the EntityManager's context to the cache. |
boolean |
getRollbackOnly()
Determine whether the current transaction has been marked for rollback. |
boolean |
isActive()
Indicate whether a transaction is in progress. |
void |
rollback()
Roll back the current transaction. |
void |
setRollbackOnly()
Mark the current transaction so that the only possible outcome of the transaction is for the transaction to be rolled back. |
Method Detail |
---|
void begin()
IllegalStateException
- if isActive() is true.
PersistenceException
- if the transaction is unable to start.Session.begin()
void commit()
IllegalStateException
- if isActive() is false.
PersistenceException
- if the commit fails.Session.commit()
void rollback()
IllegalStateException
- if isActive() is false.
PersistenceException
- if an unexpected error
condition is encountered.Session.rollback()
boolean isActive()
PersistenceException
- if an unexpected error condition is encountered.Session.isTransactionActive()
void setRollbackOnly()
IllegalStateException
- if isActive() is false.Session.markRollbackOnly(Throwable)
boolean getRollbackOnly()
IllegalStateException
- if isActive() is false.Session.isMarkedRollbackOnly()
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |