|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionContext
This interface provides access to contextual information around the current executing transaction. A
TransactionContext
is passed as a parameter to
TransactionCallback.doInTransaction()
.
Method Summary | |
---|---|
boolean |
isCompleted()
Determines whether this transaction is completed, meaning that it has already been committed or rolled back. |
boolean |
isNewTransaction()
Determines if the transaction is new or is participating in an existing transaction. |
boolean |
isRollbackOnly()
Determines if the transaction has been set rollback-only. |
void |
setRollbackOnly()
Sets the transaction to rollback-only, which communicates to the transaction manager that the only possible outcome of the transaction may be a rollback. |
Method Detail |
---|
boolean isNewTransaction()
true
if the transaction is new, false
otherwise.void setRollbackOnly()
For transactions managed by TransactionTemplate
,
an alternative way to trigger a rollback is throwing an application exception.
boolean isRollbackOnly()
true
if the transaction has been set rollback-only, false
otherwise.boolean isCompleted()
true
if this transaction is completed, false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |