|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionStatus
Representation of the status of a transaction.
Transactional code can use this to retrieve status information, and to programmatically request a rollback (instead of throwing an exception that causes an implicit rollback).
Derives from the SavepointManager interface to provide access to savepoint management facilities. Note that savepoint management is only available if supported by the underlying transaction manager.
setRollbackOnly()
,
PlatformTransactionManager.getTransaction(org.springframework.transaction.TransactionDefinition)
,
TransactionCallback.doInTransaction(org.springframework.transaction.TransactionStatus)
,
TransactionAspectSupport.currentTransactionStatus()
Method Summary | |
---|---|
boolean |
hasSavepoint()
Return whether this transaction internally carries a savepoint, that is, has been created as nested transaction based on a savepoint. |
boolean |
isCompleted()
Return whether this transaction is completed, that is, whether it has already been committed or rolled back. |
boolean |
isNewTransaction()
Return whether the present transaction is new (else participating in an existing transaction, or potentially not running in an actual transaction in the first place). |
boolean |
isRollbackOnly()
Return whether the transaction has been marked as rollback-only (either by the application or by the transaction infrastructure). |
void |
setRollbackOnly()
Set the transaction rollback-only. |
Methods inherited from interface org.springframework.transaction.SavepointManager |
---|
createSavepoint, releaseSavepoint, rollbackToSavepoint |
Method Detail |
---|
boolean isNewTransaction()
boolean hasSavepoint()
This method is mainly here for diagnostic purposes, alongside
isNewTransaction()
. For programmatic handling of custom
savepoints, use SavepointManager's operations.
void setRollbackOnly()
This is mainly intended for transactions managed by
TransactionTemplate
or
TransactionInterceptor
,
where the actual commit/rollback decision is made by the container.
boolean isRollbackOnly()
boolean isCompleted()
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |