List of utility methods to do JDBC Collection Transaction
void | commitEL(Connection conn) commit EL try { if (conn != null) conn.commit(); } catch (Throwable e) { |
void | commitQuietly(Connection conn) Commits a Connection then closes it, avoid closing if null and hide any SQLExceptions that occur.
try { conn.commit(); } catch (SQLException e) { |
void | commitTransaction(Connection connection) commit Transaction try { connection.createStatement().executeUpdate("COMMIT TRANSACTION;"); } catch (SQLException ex) { System.out.println("Commit transaction failed"); |
boolean | isAutoCommit(Connection con) Returns true if and only if Connection is in auto commit mode. try { return con.getAutoCommit(); } catch (SQLException e) { throw new RuntimeException(e); |
void | releaseAutoCommit(Connection conn, boolean changedAutoCommit) release Auto Commit if (changedAutoCommit) { try { conn.commit(); conn.setAutoCommit(true); } catch (SQLException e) { |
void | resetTxnState(Connection pCon, boolean forceIgnoreUnresolvedTransactions, boolean autoCommitOnClose, boolean txnKnownResolved) reset Txn State if (!forceIgnoreUnresolvedTransactions && !pCon.getAutoCommit()) { if (!autoCommitOnClose && !txnKnownResolved) { pCon.rollback(); pCon.setAutoCommit(true); |
void | rollback(Connection conn) rollback if (conn != null) { try { conn.rollback(); } catch (SQLException e) { e.printStackTrace(); |
void | rollback(Connection conn) Rollback. try { if (conn != null) conn.rollback(); } catch (Exception e) { |
void | rollback(Connection conn) rollback if (conn != null) {
conn.rollback();
|
void | rollback(Connection connection) Roll back the transaction of the given connection. if (connection != null) { try { connection.rollback(); } catch (SQLException e) { |