Example usage for javax.resource.cci ResultSet close

List of usage examples for javax.resource.cci ResultSet close

Introduction

In this page you can find the example usage for javax.resource.cci ResultSet close.

Prototype

void close() throws SQLException;

Source Link

Document

Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Usage

From source file:org.springframework.jca.cci.core.CciTemplate.java

/**
 * Close the given CCI ResultSet and ignore any thrown exception.
 * This is useful for typical finally blocks in manual CCI code.
 * @param resultSet the CCI ResultSet to close
 * @see javax.resource.cci.ResultSet#close()
 *///  w ww.  j  a va 2 s .co m
private void closeResultSet(@Nullable ResultSet resultSet) {
    if (resultSet != null) {
        try {
            resultSet.close();
        } catch (SQLException ex) {
            logger.trace("Could not close CCI ResultSet", ex);
        } catch (Throwable ex) {
            // We don't trust the CCI driver: It might throw RuntimeException or Error.
            logger.trace("Unexpected exception on closing CCI ResultSet", ex);
        }
    }
}