Example usage for org.springframework.jdbc.datasource ConnectionHolder resetRollbackOnly

List of usage examples for org.springframework.jdbc.datasource ConnectionHolder resetRollbackOnly

Introduction

In this page you can find the example usage for org.springframework.jdbc.datasource ConnectionHolder resetRollbackOnly.

Prototype

public void resetRollbackOnly() 

Source Link

Document

Reset the rollback-only status for this resource transaction.

Usage

From source file:org.springframework.jdbc.datasource.JdbcTransactionObjectSupport.java

/**
 * This implementation rolls back to the given JDBC 3.0 Savepoint.
 * @see java.sql.Connection#rollback(java.sql.Savepoint)
 *//*  w ww.  j  a v a  2 s. c  o m*/
@Override
public void rollbackToSavepoint(Object savepoint) throws TransactionException {
    ConnectionHolder conHolder = getConnectionHolderForSavepoint();
    try {
        conHolder.getConnection().rollback((Savepoint) savepoint);
        conHolder.resetRollbackOnly();
    } catch (Throwable ex) {
        throw new TransactionSystemException("Could not roll back to JDBC savepoint", ex);
    }
}