From 1a6cbfa651382286e622c4c9f9c68a4fd55cfffd Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Thu, 7 Feb 2008 10:15:54 +0000 Subject: [PATCH] fix for https://issues.apache.org/activemq/browse/AMQ-1446 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@619347 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/store/memory/MemoryPersistenceAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java index 87ff7650e4..9d876476f2 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java @@ -29,6 +29,7 @@ import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.store.MessageStore; import org.apache.activemq.store.PersistenceAdapter; +import org.apache.activemq.store.ProxyMessageStore; import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TransactionStore; import org.apache.activemq.usage.SystemUsage; @@ -143,6 +144,12 @@ public class MemoryPersistenceAdapter implements PersistenceAdapter { if (value instanceof MemoryMessageStore) { return (MemoryMessageStore)value; } + if (value instanceof ProxyMessageStore) { + MessageStore delegate = ((ProxyMessageStore)value).getDelegate(); + if (delegate instanceof MemoryMessageStore) { + return (MemoryMessageStore) delegate; + } + } LOG.warn("Expected an instance of MemoryMessageStore but was: " + value); return null; }