Example usage for org.apache.commons.dbutils DbUtils commitAndClose

List of usage examples for org.apache.commons.dbutils DbUtils commitAndClose

Introduction

In this page you can find the example usage for org.apache.commons.dbutils DbUtils commitAndClose.

Prototype

public static void commitAndClose(Connection conn) throws SQLException 

Source Link

Document

Commits a Connection then closes it, avoid closing if null.

Usage

From source file:org.okinawaopenlabs.orientdb.client.ConnectionManagerJdbc.java

/**
 * commit/*from www .  j ava 2s .c o m*/
 *
 * @param database
 * @throws SQLException
 */
synchronized public void commit(Connection conn) throws SQLException {
    DbUtils.commitAndClose(conn);
}

From source file:org.openlogics.gears.jdbc.DataStore.java

/**
 * @throws SQLException
 */
public void commitAndClose() throws SQLException {
    DbUtils.commitAndClose(connection);
}