Example usage for org.springframework.jdbc.datasource DataSourceUtils resetConnectionAfterTransaction

List of usage examples for org.springframework.jdbc.datasource DataSourceUtils resetConnectionAfterTransaction

Introduction

In this page you can find the example usage for org.springframework.jdbc.datasource DataSourceUtils resetConnectionAfterTransaction.

Prototype

public static void resetConnectionAfterTransaction(Connection con, @Nullable Integer previousIsolationLevel) 

Source Link

Document

Reset the given Connection after a transaction, regarding read-only flag and isolation level.

Usage

From source file:eu.trentorise.smartcampus.permissionprovider.oauth.IsolationSupportHibernateJpaDialect.java

@Override
public void cleanupTransaction(Object transactionData) {
    try {/* w w w .j  av  a 2s  .  co  m*/
        super.cleanupTransaction(transactionData);
        DataSourceUtils.resetConnectionAfterTransaction(connectionThreadLocal.get(), originalIsolation.get());
    } finally {
        connectionThreadLocal.remove();
        originalIsolation.remove();
    }
}