if (!getTransacted()) {
throw new javax.jms.IllegalStateException("Not a transacted session");
}
// Only rollback commit if the transaction was started.
if (this.startTransaction.commit(true, false)) {
TransactionInfo info = new TransactionInfo();
info.setId(this.packetIdGenerator.generateId());
info.setTransactionId(currentTransactionId);
info.setType(TransactionInfo.ROLLBACK);
//before we send, update the current transaction id
this.currentTransactionId = null;
this.connection.asyncSendPacket(info);
// Notify the listener that the tx was rolled back
if (localTransactionEventListener != null) {