Java Utililty Methods JDBC Collection Transaction

List of utility methods to do JDBC Collection Transaction

Description

The list of methods to do JDBC Collection Transaction are organized into topic(s).

Method

voidrollbackQuietly(Connection connection)
rollback a connection quietly
if (connection != null) {
    try {
        connection.rollback();
    } catch (Exception e) {
voidsafeCommit(Connection conn)
safe Commit
if (conn != null) {
    try {
        conn.commit();
    } catch (SQLException ex) {
        conn.rollback();
booleansetAutoCommit(Connection conn, boolean autoCommit)
set Auto Commit
if (conn == null) {
    return true;
try {
    conn.setAutoCommit(autoCommit);
} catch (Exception e) {
    return false;
return true;
booleansetAutoCommit(final Connection connection, final boolean value)
set Auto Commit
try {
    boolean previousValue = connection.getAutoCommit();
    connection.setAutoCommit(value);
    return previousValue;
} catch (Exception e) {
    throw new IllegalStateException("Unable to set the Connection autoCommit to " + value, e);
voidsetAutoCommitEL(Connection conn, boolean b)
set Auto Commit EL
try {
    if (conn != null)
        conn.setAutoCommit(b);
} catch (Throwable e) {
voidsetAutoCommitMode(Connection conn, boolean autoCommit)
set Auto Commit Mode
try {
    conn.setAutoCommit(autoCommit);
} catch (SQLException e) {