Java JDBC Collection Transaction isAutoCommit(Connection con)

Here you can find the source of isAutoCommit(Connection con)

Description

Returns true if and only if Connection is in auto commit mode.

License

Apache License

Parameter

Parameter Description
con a parameter

Declaration

static boolean isAutoCommit(Connection con) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.Connection;

import java.sql.SQLException;

public class Main {
    /**/*  www  .  j  a  va  2s. co  m*/
     * Returns true if and only if {@link Connection} is in auto commit mode.
     * 
     * @param con
     * @return
     */
    static boolean isAutoCommit(Connection con) {
        try {
            return con.getAutoCommit();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. commitAndClose(Connection connection)
  2. commitAndClose(Connection connection)
  3. commitEL(Connection conn)
  4. commitQuietly(Connection conn)
  5. commitTransaction(Connection connection)
  6. releaseAutoCommit(Connection conn, boolean changedAutoCommit)
  7. resetTxnState(Connection pCon, boolean forceIgnoreUnresolvedTransactions, boolean autoCommitOnClose, boolean txnKnownResolved)
  8. rollback(Connection conn)
  9. rollback(Connection conn)