Example usage for org.springframework.transaction.support DefaultTransactionStatus getSuspendedResources

List of usage examples for org.springframework.transaction.support DefaultTransactionStatus getSuspendedResources

Introduction

In this page you can find the example usage for org.springframework.transaction.support DefaultTransactionStatus getSuspendedResources.

Prototype

@Nullable
public Object getSuspendedResources() 

Source Link

Document

Return the holder for resources that have been suspended for this transaction, if any.

Usage

From source file:org.springframework.transaction.support.AbstractPlatformTransactionManager.java

/**
 * Clean up after completion, clearing synchronization if necessary,
 * and invoking doCleanupAfterCompletion.
 * @param status object representing the transaction
 * @see #doCleanupAfterCompletion//from w w  w . j a v  a  2s.  c  om
 */
private void cleanupAfterCompletion(DefaultTransactionStatus status) {
    status.setCompleted();
    if (status.isNewSynchronization()) {
        TransactionSynchronizationManager.clear();
    }
    if (status.isNewTransaction()) {
        doCleanupAfterCompletion(status.getTransaction());
    }
    if (status.getSuspendedResources() != null) {
        if (status.isDebug()) {
            logger.debug("Resuming suspended transaction after completion of inner transaction");
        }
        Object transaction = (status.hasTransaction() ? status.getTransaction() : null);
        resume(transaction, (SuspendedResourcesHolder) status.getSuspendedResources());
    }
}