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:
Bosanac Dejan 2012-06-01 09:14:28 +00:00
parent b41b7cc8ba
commit 6d041dc2a5
1 changed files with 9 additions and 12 deletions

View File

@ -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();
}
}