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.
Return whether the present transaction is new; otherwise participating
in an existing transaction, or potentially not running in an actual
transaction in the first place.
public boolean isNewSynchronization()
Return if a new transaction synchronization has been opened
for this transaction.
public boolean isReadOnly()
Return if this transaction is defined as read-only transaction.
public boolean isDebug()
Return whether the progress of this transaction is debugged. This is used by
AbstractPlatformTransactionManager as an optimization, to prevent repeated
calls to logger.isDebugEnabled(). Not really intended for client code.
public java.lang.Object getSuspendedResources()
Return the holder for resources that have been suspended for this transaction,
public boolean isGlobalRollbackOnly()
Determine the rollback-only flag via checking the transaction object, provided
that the latter implements the SmartTransactionObject interface.
Will return true if the global transaction itself has been marked
rollback-only by the transaction coordinator, for example in case of a timeout.