activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r619347 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
Date Thu, 07 Feb 2008 10:15:55 GMT
Author: rajdavies
Date: Thu Feb  7 02:15:54 2008
New Revision: 619347

URL: http://svn.apache.org/viewvc?rev=619347&view=rev
Log:
fix for https://issues.apache.org/activemq/browse/AMQ-1446

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java?rev=619347&r1=619346&r2=619347&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
Thu Feb  7 02:15:54 2008
@@ -29,6 +29,7 @@
 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;
@@ -142,6 +143,12 @@
     protected MemoryMessageStore asMemoryMessageStore(Object value) {
         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;



Mime
View raw message