|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for transaction synchronization callbacks. Supported by AbstractPlatformTransactionManager.
TransactionSynchronizationManager,
AbstractPlatformTransactionManager| Field Summary | |
static int |
STATUS_COMMITTED
Completion status in case of proper commit |
static int |
STATUS_ROLLED_BACK
Completion status in case of proper rollback |
static int |
STATUS_UNKNOWN
Completion status in case of heuristic mixed completion or system errors |
| Method Summary | |
void |
afterCompletion(int status)
Invoked after transaction commit/rollback. |
void |
beforeCommit(boolean readOnly)
Invoked before transaction commit (before "beforeCompletion"). |
void |
beforeCompletion()
Invoked before transaction commit/rollback (after "beforeCommit", even if beforeCommit threw an exception). |
void |
resume()
Resume this synchronization. |
void |
suspend()
Suspend this synchronization. |
| Field Detail |
public static final int STATUS_COMMITTED
public static final int STATUS_ROLLED_BACK
public static final int STATUS_UNKNOWN
| Method Detail |
public void suspend()
TransactionSynchronizationManager.unbindResource(java.lang.Object)public void resume()
TransactionSynchronizationManager.bindResource(java.lang.Object, java.lang.Object)public void beforeCommit(boolean readOnly)
Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.
readOnly - if the transaction is defined as read-only transaction
java.lang.RuntimeException - in case of errors
(note: do not throw TransactionException subclasses here!)beforeCompletion()public void beforeCompletion()
Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.
java.lang.RuntimeException - in case of errors
(note: do not throw TransactionException subclasses here!)beforeCommit(boolean),
afterCompletion(int)public void afterCompletion(int status)
Note that exceptions will get propagated to the commit or rollback caller, although they will not influence the outcome of the transaction.
status - completion status according to the STATUS_* constants
java.lang.RuntimeException - in case of errors
(note: do not throw TransactionException subclasses here!)STATUS_COMMITTED,
STATUS_ROLLED_BACK,
STATUS_UNKNOWN,
beforeCompletion()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||