From 6d44ae6e971a341217c6f5a8669900740654b0ab Mon Sep 17 00:00:00 2001 From: gtully Date: Mon, 15 Aug 2016 11:37:38 +0100 Subject: [PATCH] AMQ-5815 - remove obsolete remnant of fix for AMQ-2594. holding global lock before attempting to get index and checkpoint lock can lead to deadlock if checkpoint write lock request pops in --- .../transaction/LocalTransaction.java | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/transaction/LocalTransaction.java b/activemq-broker/src/main/java/org/apache/activemq/transaction/LocalTransaction.java index d3f7f116bd..761c651218 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/transaction/LocalTransaction.java +++ b/activemq-broker/src/main/java/org/apache/activemq/transaction/LocalTransaction.java @@ -88,20 +88,15 @@ public class LocalTransaction extends Transaction { } setState(Transaction.FINISHED_STATE); context.getTransactions().remove(xid); - // Sync on transaction store to avoid out of order messages in the cursor - // https://issues.apache.org/activemq/browse/AMQ-2594 - synchronized (transactionStore) { - transactionStore.rollback(getTransactionId()); - - try { - fireAfterRollback(); - } catch (Throwable e) { - LOG.warn("POST ROLLBACK FAILED: ", e); - XAException xae = new XAException("POST ROLLBACK FAILED"); - xae.errorCode = XAException.XAER_RMERR; - xae.initCause(e); - throw xae; - } + transactionStore.rollback(getTransactionId()); + try { + fireAfterRollback(); + } catch (Throwable e) { + LOG.warn("POST ROLLBACK FAILED: ", e); + XAException xae = new XAException("POST ROLLBACK FAILED"); + xae.errorCode = XAException.XAER_RMERR; + xae.initCause(e); + throw xae; } }