Java JDBC Collection Transaction commit(Connection conn)

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

Description

commit

License

Open Source License

Parameter

Parameter Description
conn Connection

Declaration

public static void commit(Connection conn) 

Method Source Code

//package com.java2s;

import java.sql.Connection;
import java.sql.SQLException;

public class Main {
    /**// w  w  w .ja  va  2 s .  c  o m
     * commit
     * 
     * @param conn Connection
     */
    public static void commit(Connection conn) {
        try {
            if (conn == null || conn.isClosed()) {
                return;
            }
            conn.commit();
        } catch (SQLException e) {
            throw new RuntimeException("Committed error:" + e.getMessage(), e);
        }
    }
}

Related

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