Example usage for java.sql Connection abort

List of usage examples for java.sql Connection abort

Introduction

In this page you can find the example usage for java.sql Connection abort.

Prototype

void abort(Executor executor) throws SQLException;

Source Link

Document

Terminates an open connection.

Usage

From source file:com.adaptris.jdbc.connection.FailoverDatasourceTest.java

@Test
public void testAbort() throws Exception {
    Connection conn = new MyProxy();

    try {/*w  w w .  jav a 2s  .  c o  m*/
        try {
            conn.abort(Executors.newSingleThreadExecutor());
        } catch (SQLException e) {

        }
    } finally {
        JdbcUtil.closeQuietly(conn);
    }
}