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

voidcommitEL(Connection conn)
commit EL
try {
    if (conn != null)
        conn.commit();
} catch (Throwable e) {
voidcommitQuietly(Connection conn)
Commits a Connection then closes it, avoid closing if null and hide any SQLExceptions that occur.
try {
    conn.commit();
} catch (SQLException e) { 
voidcommitTransaction(Connection connection)
commit Transaction
try {
    connection.createStatement().executeUpdate("COMMIT TRANSACTION;");
} catch (SQLException ex) {
    System.out.println("Commit transaction failed");
booleanisAutoCommit(Connection con)
Returns true if and only if Connection is in auto commit mode.
try {
    return con.getAutoCommit();
} catch (SQLException e) {
    throw new RuntimeException(e);
voidreleaseAutoCommit(Connection conn, boolean changedAutoCommit)
release Auto Commit
if (changedAutoCommit) {
    try {
        conn.commit();
        conn.setAutoCommit(true);
    } catch (SQLException e) {
voidresetTxnState(Connection pCon, boolean forceIgnoreUnresolvedTransactions, boolean autoCommitOnClose, boolean txnKnownResolved)
reset Txn State
if (!forceIgnoreUnresolvedTransactions && !pCon.getAutoCommit()) {
    if (!autoCommitOnClose && !txnKnownResolved) {
        pCon.rollback();
    pCon.setAutoCommit(true); 
voidrollback(Connection conn)
rollback
if (conn != null) {
    try {
        conn.rollback();
    } catch (SQLException e) {
        e.printStackTrace();
voidrollback(Connection conn)
Rollback.
try {
    if (conn != null)
        conn.rollback();
} catch (Exception e) {
voidrollback(Connection conn)
rollback
if (conn != null) {
    conn.rollback();
voidrollback(Connection connection)

Roll back the transaction of the given connection.

if (connection != null) {
    try {
        connection.rollback();
    } catch (SQLException e) {