Java JDBC Collection Transaction commit(Connection conn)

Here you can find the source of commit(Connection conn)

Description

Commit a transaction without an exception even if it has an error.

License

Open Source License

Parameter

Parameter Description
conn a parameter

Declaration

public static void commit(Connection conn) 

Method Source Code


//package com.java2s;
import java.sql.Connection;

public class Main {
    /**//from   w ww . j av a 2 s .co  m
     * Commit a transaction without an exception even if it has an error.
     *
     * @param conn
     */
    public static void commit(Connection conn) {
        try {
            if (conn != null) {
                conn.commit();
            }
        } catch (Exception ignored) {
        }
    }
}

Related

  1. commit(Connection conn)
  2. commit(Connection conn)
  3. commit(Connection conn)
  4. commit(Connection conn)
  5. commit(Connection connection)
  6. commitAndClose(Connection conn)
  7. commitAndClose(Connection conn)