|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.support.DefaultTransactionStatus
Default implementation of the TransactionStatus interface, used by AbstractPlatformTransactionManager.
Holds all status information that AbstractPlatformTransactionManager needs internally, including a generic transaction object determined by the concrete transaction manager implementation.
AbstractPlatformTransactionManager
Constructor Summary | |
DefaultTransactionStatus(java.lang.Object transaction,
boolean newTransaction,
boolean newSynchronization,
boolean readOnly,
boolean debug,
java.lang.Object suspendedResources)
Create a new TransactionStatus instance. |
Method Summary | |
java.lang.Object |
getSuspendedResources()
|
java.lang.Object |
getTransaction()
Return the underlying transaction object, e.g. |
boolean |
isDebug()
Return whether the progress of this transaction is debugged. |
boolean |
isNewSynchronization()
Return if a new transaction synchronization has been opened for this transaction. |
boolean |
isNewTransaction()
Return if the transaction is new, else participating in an existing transaction. |
boolean |
isReadOnly()
Return if this transaction is defined as read-only transaction. |
boolean |
isRollbackOnly()
Return if the transaction has been set rollback-only. |
void |
setRollbackOnly()
Set the transaction rollback-only. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultTransactionStatus(java.lang.Object transaction, boolean newTransaction, boolean newSynchronization, boolean readOnly, boolean debug, java.lang.Object suspendedResources)
transaction
- underlying transaction object,
e.g. a JTA UserTransactionnewTransaction
- if the transaction is new,
else participating in an existing transactionnewSynchronization
- if a new transaction synchronization
has been opened for the given transactiondebug
- should debug logging be enabled for the handling of this transaction?
Caching it in here can prevent repeated calls to ask the logging system whether
debug logging should be enabled.Method Detail |
public java.lang.Object getTransaction()
public boolean isNewTransaction()
TransactionStatus
isNewTransaction
in interface TransactionStatus
public boolean isNewSynchronization()
public boolean isReadOnly()
public boolean isDebug()
public java.lang.Object getSuspendedResources()
public void setRollbackOnly()
TransactionStatus
For transactions managed by TransactionTemplate or TransactionInterceptor. An alternative way to trigger a rollback is throwing an application exception.
setRollbackOnly
in interface TransactionStatus
TransactionCallback.doInTransaction(org.springframework.transaction.TransactionStatus)
,
TransactionAttribute.rollbackOn(java.lang.Throwable)
public boolean isRollbackOnly()
TransactionStatus
isRollbackOnly
in interface TransactionStatus
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |