List of utility methods to do JDBC Collection Transaction
void | commit(Connection conn) Commit a transaction without an exception even if it has an error. try { if (conn != null) { conn.commit(); } catch (Exception ignored) { |
void | commit(Connection conn) commit try { if (conn == null || conn.isClosed()) { return; conn.commit(); } catch (SQLException e) { throw new RuntimeException("Committed error:" + e.getMessage(), e); |
boolean | commit(Connection conn) Commit all transactions associated with the specified connection try { if (!conn.getAutoCommit()) { conn.commit(); return true; } catch (Throwable t) { return false; ... |
void | commit(Connection conn) commit try { conn.commit(); } catch (SQLException e) { throw new RuntimeException(e); |
void | commit(Connection conn) commit if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); |
void | commit(Connection connection) Attempts to commit any submitted SQL statements using a given connection. String methodName = "commit"; try { if (connection != null && !connection.getAutoCommit()) { connection.commit(); } catch (SQLException sqlException) { Logger logger = Logger.getLogger("com.bws.jdistil.core.datasource.database"); logger.logp(Level.SEVERE, className, methodName, "Committing SQL Statements", sqlException); ... |
void | commitAndClose(Connection conn) Commits a Connection then closes it, avoid closing if null.
if (conn == null) { throw new IllegalArgumentException( "Given connection is null although trying to commit the transaction."); try { conn.commit(); } finally { conn.close(); ... |
void | commitAndClose(Connection conn) commit And Close if (conn != null) { try { conn.commit(); } finally { conn.close(); |
void | commitAndClose(Connection connection) Commits a Connection then closes it, avoid closing if null.
if (connection != null) { try { if (!connection.getAutoCommit()) { connection.commit(); } finally { connection.close(); |
void | commitAndClose(Connection connection) Commit and close. try { commit(connection); } finally { close(connection); |