private void rollbackOpenTransactions() { for(Map.Entry<Integer, ServerTransaction> entry : _createdTransactions.entrySet()) { entry.getValue().rollback(); AMQPConnection_1_0<?> connection = getSession().getConnection(); connection.decrementTransactionOpenCounter(); connection.incrementTransactionRollbackCounter(); connection.removeTransaction(entry.getKey()); } _createdTransactions.clear(); } }
public void rollback() { _transaction.rollback(); AMQPConnection_0_10 amqpConnection = getAMQPConnection(); amqpConnection.incrementTransactionRollbackCounter(); amqpConnection.incrementTransactionBeginCounter(); }
private Error forceRollback(final ServerTransaction txn, final AMQPConnection_1_0<?> connection) { txn.rollback(); connection.incrementTransactionRollbackCounter(); final Error error = new Error(); error.setCondition(TransactionError.TRANSACTION_ROLLBACK); error.setDescription("The transaction was rolled back due to an earlier issue (e.g. a published message was sent settled but could not be enqueued)"); return error; }
if(fail) txn.rollback(); connection.incrementTransactionRollbackCounter();