mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-2868 - remove sync on memoery transaction store tx
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1345023 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b41b7cc8ba
commit
6d041dc2a5
|
@ -16,12 +16,6 @@
|
|||
*/
|
||||
package org.apache.activemq.store.memory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
import org.apache.activemq.command.Message;
|
||||
import org.apache.activemq.command.MessageAck;
|
||||
|
@ -37,6 +31,12 @@ import org.apache.activemq.store.TopicMessageStore;
|
|||
import org.apache.activemq.store.TransactionRecoveryListener;
|
||||
import org.apache.activemq.store.TransactionStore;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* Provides a TransactionStore implementation that can create transaction aware
|
||||
* MessageStore objects from non transaction aware MessageStore objects.
|
||||
|
@ -243,12 +243,9 @@ public class MemoryTransactionStore implements TransactionStore {
|
|||
}
|
||||
return;
|
||||
}
|
||||
// ensure message order w.r.t to cursor and store for setBatch()
|
||||
synchronized (this) {
|
||||
tx.commit();
|
||||
if (postCommit != null) {
|
||||
postCommit.run();
|
||||
}
|
||||
tx.commit();
|
||||
if (postCommit != null) {
|
||||
postCommit.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue