From 69767a2f2f91707cfe45f46651d4fdf0e55add41 Mon Sep 17 00:00:00 2001 From: Dejan Bosanac Date: Thu, 9 Apr 2015 13:27:14 +0200 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-5665 - memory store don't propagate connection context --- .../store/memory/MemoryTransactionStore.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java b/activemq-broker/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java index c3d1b8a74b..aa2413db68 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java +++ b/activemq-broker/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java @@ -140,23 +140,23 @@ public class MemoryTransactionStore implements TransactionStore { ProxyMessageStore proxyMessageStore = new ProxyMessageStore(messageStore) { @Override public void addMessage(ConnectionContext context, final Message send) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), send); + MemoryTransactionStore.this.addMessage(context, getDelegate(), send); } @Override public void addMessage(ConnectionContext context, final Message send, boolean canOptimize) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), send); + MemoryTransactionStore.this.addMessage(context, getDelegate(), send); } @Override public ListenableFuture asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), message); + MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); } @Override public ListenableFuture asyncAddQueueMessage(ConnectionContext context, Message message, boolean canoptimize) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), message); + MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); } @@ -181,23 +181,23 @@ public class MemoryTransactionStore implements TransactionStore { ProxyTopicMessageStore proxyTopicMessageStore = new ProxyTopicMessageStore(messageStore) { @Override public void addMessage(ConnectionContext context, final Message send) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), send); + MemoryTransactionStore.this.addMessage(context, getDelegate(), send); } @Override public void addMessage(ConnectionContext context, final Message send, boolean canOptimize) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), send); + MemoryTransactionStore.this.addMessage(context, getDelegate(), send); } @Override public ListenableFuture asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), message); + MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); } @Override public ListenableFuture asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimize) throws IOException { - MemoryTransactionStore.this.addMessage(getDelegate(), message); + MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); } @@ -310,7 +310,7 @@ public class MemoryTransactionStore implements TransactionStore { * @param message * @throws IOException */ - void addMessage(final MessageStore destination, final Message message) throws IOException { + void addMessage(final ConnectionContext context, final MessageStore destination, final Message message) throws IOException { if (doingRecover) { return; @@ -340,7 +340,7 @@ public class MemoryTransactionStore implements TransactionStore { }); } else { - destination.addMessage(null, message); + destination.addMessage(context, message); } }