/** * Releases an existing connection (paying special attention to {@link Transaction#AUTO_COMMIT}. * * <p>If the state is based off the AUTO_COMMIT transaction - close using {@link * #closeSafe(Connection)}. Otherwise wait until the transaction itself is closed to close the * connection. */ protected final void releaseConnection(Connection cx, JDBCState state) { if (state.getTransaction() == Transaction.AUTO_COMMIT) { closeSafe(cx); } }
/** Gets a database connection for the specified feature store. */ protected final Connection getConnection(JDBCState state) throws IOException { return getConnection(state.getTransaction()); }
Connection cx = getDataStore().getConnection(getState().getTransaction()); if (getState().getTransaction() == Transaction.AUTO_COMMIT) { cx.setAutoCommit(false);
Connection cx = getDataStore().getConnection(getState().getTransaction()); if (getState().getTransaction() == Transaction.AUTO_COMMIT) { cx.setAutoCommit(false);
Transaction tx = getState().getTransaction(); try { cx = getDataStore().getConnection(tx);
} else { Transaction tx = getState().getTransaction(); Connection cx = null;
/** * Gets a database connection for the specified feature store. */ protected final Connection getConnection(JDBCState state) throws IOException { return getConnection(state.getTransaction()); }
/** * Releases an existing connection (paying special attention to {@link Transaction#AUTO_COMMIT}. * <p> * If the state is based off the AUTO_COMMIT transaction - close using {@link #closeSafe(Connection)}. * Otherwise wait until the transaction itself is closed to close the connection. */ protected final void releaseConnection( Connection cx, JDBCState state ) { if ( state.getTransaction() == Transaction.AUTO_COMMIT ) { closeSafe( cx ); } }
/** * Releases an existing connection. */ protected final void releaseConnection( Connection cx, JDBCState state ) { //if the state is based off the AUTO_COMMIT transaction, close the // connection, otherwise wait until the transaction itself is closed to // close the connection if ( state.getTransaction() == Transaction.AUTO_COMMIT ) { closeSafe( cx ); } }
if (getState().getTransaction() == Transaction.AUTO_COMMIT) { cx.setAutoCommit(dialect.isAutoCommitQuery());
if(state.getTransaction() == Transaction.AUTO_COMMIT) { Connection cx = createConnection(); try { state.getTransaction().putState(state, new JDBCTransactionState( cx, this ) );
if(getState().getTransaction() == Transaction.AUTO_COMMIT) { cx.setAutoCommit(false);
Transaction tx = getState().getTransaction(); try { cx = getDataStore().getConnection(tx);
if(getState().getTransaction() == Transaction.AUTO_COMMIT) { cx.setAutoCommit(false);
} else { Transaction tx = getState().getTransaction(); Connection cx = null;
if(getState().getTransaction() == Transaction.AUTO_COMMIT) { cx.setAutoCommit(dialect.isAutoCommitQuery());