mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2594 - synchronizing transaction store commit and triggering afterCommit event
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@923694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
24a7626b06
commit
8183ed5c90
|
@ -67,6 +67,7 @@ public class LocalTransaction extends Transaction {
|
||||||
|
|
||||||
setState(Transaction.FINISHED_STATE);
|
setState(Transaction.FINISHED_STATE);
|
||||||
context.getTransactions().remove(xid);
|
context.getTransactions().remove(xid);
|
||||||
|
synchronized (transactionStore) {
|
||||||
transactionStore.commit(getTransactionId(), false);
|
transactionStore.commit(getTransactionId(), false);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -81,6 +82,7 @@ public class LocalTransaction extends Transaction {
|
||||||
throw xae;
|
throw xae;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void rollback() throws XAException, IOException {
|
public void rollback() throws XAException, IOException {
|
||||||
|
|
||||||
|
@ -90,6 +92,7 @@ public class LocalTransaction extends Transaction {
|
||||||
}
|
}
|
||||||
setState(Transaction.FINISHED_STATE);
|
setState(Transaction.FINISHED_STATE);
|
||||||
context.getTransactions().remove(xid);
|
context.getTransactions().remove(xid);
|
||||||
|
synchronized (transactionStore) {
|
||||||
transactionStore.rollback(getTransactionId());
|
transactionStore.rollback(getTransactionId());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -102,6 +105,7 @@ public class LocalTransaction extends Transaction {
|
||||||
throw xae;
|
throw xae;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int prepare() throws XAException {
|
public int prepare() throws XAException {
|
||||||
XAException xae = new XAException("Prepare not implemented on Local Transactions.");
|
XAException xae = new XAException("Prepare not implemented on Local Transactions.");
|
||||||
|
|
Loading…
Reference in New Issue