public void rollback() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { doRollback(); } catch (SQLException e) { JDBCPersistenceAdapter.log("Rollback failed: ", e); throw IOExceptionSupport.create(e); } finally { inTx = false; close(); } }
public void commit() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { final boolean needsCommit = !connection.getAutoCommit(); executeBatch(); if (needsCommit) { connection.commit(); } } catch (SQLException e) { JDBCPersistenceAdapter.log("Commit failed: ", e); try { doRollback(); } catch (Exception ignored) {} IOException ioe = IOExceptionSupport.create(e); persistenceAdapter.getBrokerService().handleIOException(ioe); throw ioe; } finally { inTx = false; close(); } }
public void rollback() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { doRollback(); } catch (SQLException e) { JDBCPersistenceAdapter.log("Rollback failed: ", e); throw IOExceptionSupport.create(e); } finally { inTx = false; close(); } }
public void rollback() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { doRollback(); } catch (SQLException e) { JDBCPersistenceAdapter.log("Rollback failed: ", e); throw IOExceptionSupport.create(e); } finally { inTx = false; close(); } }
public void rollback() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { doRollback(); } catch (SQLException e) { JDBCPersistenceAdapter.log("Rollback failed: ", e); throw IOExceptionSupport.create(e); } finally { inTx = false; close(); } }
public void commit() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { executeBatch(); if (!connection.getAutoCommit()) { connection.commit(); } } catch (SQLException e) { JDBCPersistenceAdapter.log("Commit failed: ", e); try { doRollback(); } catch (Exception ignored) {} IOException ioe = IOExceptionSupport.create(e); persistenceAdapter.getBrokerService().handleIOException(ioe); throw ioe; } finally { inTx = false; close(); } }
public void commit() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { executeBatch(); if (!connection.getAutoCommit()) { connection.commit(); } } catch (SQLException e) { JDBCPersistenceAdapter.log("Commit failed: ", e); try { doRollback(); } catch (Exception ignored) {} IOException ioe = IOExceptionSupport.create(e); persistenceAdapter.getBrokerService().handleIOException(ioe); throw ioe; } finally { inTx = false; close(); } }
public void commit() throws IOException { if (!inTx) { throw new IOException("Not started."); } try { executeBatch(); if (!connection.getAutoCommit()) { connection.commit(); } } catch (SQLException e) { JDBCPersistenceAdapter.log("Commit failed: ", e); try { doRollback(); } catch (Exception ignored) {} IOException ioe = IOExceptionSupport.create(e); persistenceAdapter.getBrokerService().handleIOException(ioe); throw ioe; } finally { inTx = false; close(); } }