summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-11-15 10:28:11 +0000
committerGordon Sim <gsim@apache.org>2006-11-15 10:28:11 +0000
commit8690d6d8c01335523a8a4b1677979ee1ce51dec0 (patch)
tree8df5afa2dcd96a57b9cbf869a7a3a672af4ba134 /cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
parent71ae30ea0b7d3cb4b848ad84fb90c782894cf606 (diff)
downloadqpid-python-8690d6d8c01335523a8a4b1677979ee1ce51dec0.tar.gz
Added ability for broker to load a message store implementation from a library.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@475181 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
index c5f17c006a..5b7bb1ff5e 100644
--- a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
+++ b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
@@ -23,6 +23,7 @@
#include <qpid/broker/DirectExchange.h>
#include <qpid/broker/FanOutExchange.h>
#include <qpid/broker/HeadersExchange.h>
+#include <qpid/broker/MessageStoreModule.h>
#include <qpid/broker/NullMessageStore.h>
#include <qpid/broker/SessionHandlerImpl.h>
@@ -38,8 +39,9 @@ const std::string amq_fanout("amq.fanout");
const std::string amq_match("amq.match");
}
-SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(u_int32_t _timeout) :
- store(new NullMessageStore()), queues(store.get()), timeout(_timeout), cleaner(&queues, timeout/10)
+SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(const std::string& _store, u_int32_t _timeout) :
+ store(_store.empty() ? (MessageStore*) new NullMessageStore() : (MessageStore*) new MessageStoreModule(_store)),
+ queues(store.get()), timeout(_timeout), cleaner(&queues, timeout/10)
{
exchanges.declare(empty, DirectExchange::typeName); // Default exchange.
exchanges.declare(amq_direct, DirectExchange::typeName);