java.lang.Object | ||
↳ | org.springframework.transaction.support.AbstractTransactionStatus | |
↳ | org.springframework.transaction.support.DefaultTransactionStatus |
Default implementation of the TransactionStatus
interface, used by AbstractPlatformTransactionManager
. Based on the concept
of an underlying "transaction object".
Holds all status information that AbstractPlatformTransactionManager
needs internally, including a generic transaction object determined by the
concrete transaction manager implementation.
Supports delegating savepoint-related methods to a transaction object
that implements the SavepointManager
interface.
NOTE: This is not intended for use with other PlatformTransactionManager
implementations, in particular not for mock transaction managers in testing environments.
Use the alternative SimpleTransactionStatus
class or a mock for the plain
TransactionStatus
interface instead.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new DefaultTransactionStatus instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Delegate the flushing to the transaction object,
provided that the latter implements the
SmartTransactionObject interface. | |||||||||||
Return the holder for resources that have been suspended for this transaction,
if any.
| |||||||||||
Return the underlying transaction object.
| |||||||||||
Return whether there is an actual transaction active.
| |||||||||||
Return whether the progress of this transaction is debugged.
| |||||||||||
Determine the rollback-only flag via checking both the transaction object,
provided that the latter implements the
SmartTransactionObject interface. | |||||||||||
Return if a new transaction synchronization has been opened
for this transaction.
| |||||||||||
Return if this transaction is defined as read-only transaction.
| |||||||||||
Return whether the underlying transaction implements the
SavepointManager interface.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This implementation exposes the SavepointManager interface
of the underlying transaction object, if any.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.transaction.support.AbstractTransactionStatus
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.transaction.SavepointManager
| |||||||||||
From interface
org.springframework.transaction.TransactionStatus
|
Create a new DefaultTransactionStatus instance.
transaction | underlying transaction object that can hold state for the internal transaction implementation |
---|---|
newTransaction | if the transaction is new, else participating in an existing transaction |
newSynchronization | if a new transaction synchronization has been opened for the given transaction |
readOnly | whether the transaction is read-only |
debug | 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. |
suspendedResources | a holder for resources that have been suspended for this transaction, if any |
Delegate the flushing to the transaction object,
provided that the latter implements the SmartTransactionObject
interface.
Return the holder for resources that have been suspended for this transaction, if any.
Return whether there is an actual transaction active.
Return whether the progress of this transaction is debugged. This is used by AbstractPlatformTransactionManager as an optimization, to prevent repeated calls to logger.isDebug(). Not really intended for client code.
Determine the rollback-only flag via checking both the transaction object,
provided that the latter implements the SmartTransactionObject
interface.
Will return "true" if the transaction itself has been marked rollback-only by the transaction coordinator, for example in case of a timeout.
Return if a new transaction synchronization has been opened for this transaction.
Return if this transaction is defined as read-only transaction.
Return whether the underlying transaction implements the SavepointManager interface.
This implementation exposes the SavepointManager interface of the underlying transaction object, if any.