git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@619347 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-02-07 10:15:54 +00:00
parent 6c52d28985
commit 1a6cbfa651
1 changed files with 7 additions and 0 deletions

View File

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