Here you can find the source of commit(Connection conn)
public static void commit(Connection conn)
//package com.java2s; //License from project: Open Source License import java.sql.Connection; import java.sql.SQLException; public class Main { public static void commit(Connection conn) { if (conn != null) { try { conn.close();//ww w . ja va2 s. co m } catch (SQLException e) { e.printStackTrace(); } } } public static void close(Connection conn) { if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } }