Here you can find the source of commit(Connection conn)
Parameter | Description |
---|---|
conn | Connection |
public static void commit(Connection conn)
//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); } } }