Java JDBC Collection Transaction setAutoCommit(Connection conn, boolean autoCommit)

Here you can find the source of setAutoCommit(Connection conn, boolean autoCommit)

Description

set Auto Commit

License

Open Source License

Declaration

public static boolean setAutoCommit(Connection conn, boolean autoCommit) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Connection;

public class Main {
    public static boolean setAutoCommit(Connection conn, boolean autoCommit) {
        if (conn == null) {
            return true;
        }/*from www  .  j a  va  2  s .  c om*/

        try {
            conn.setAutoCommit(autoCommit);
        } catch (Exception e) {
            return false;
        }
        return true;
    }
}

Related

  1. rollbackAndCloseQuietly(Connection conn)
  2. rollbackQuietly(Connection conn)
  3. rollbackQuietly(Connection conn)
  4. rollbackQuietly(Connection connection)
  5. safeCommit(Connection conn)
  6. setAutoCommit(final Connection connection, final boolean value)
  7. setAutoCommitEL(Connection conn, boolean b)
  8. setAutoCommitMode(Connection conn, boolean autoCommit)