diff options
Diffstat (limited to 'cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp')
-rw-r--r-- | cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp | 6 |
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); |