[rhmessaging-commits] rhmessaging commits: r3664 - store/trunk/cpp/lib.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Fri Oct 2 13:57:33 EDT 2009
Author: kpvdr
Date: 2009-10-02 13:57:33 -0400 (Fri, 02 Oct 2009)
New Revision: 3664
Modified:
store/trunk/cpp/lib/StorePlugin.cpp
Log:
Fix for change of interface for plugins in qpid r.821066.
Modified: store/trunk/cpp/lib/StorePlugin.cpp
===================================================================
--- store/trunk/cpp/lib/StorePlugin.cpp 2009-09-30 22:47:59 UTC (rev 3663)
+++ store/trunk/cpp/lib/StorePlugin.cpp 2009-10-02 17:57:33 UTC (rev 3664)
@@ -36,14 +36,14 @@
struct StorePlugin : public Plugin {
mrg::msgstore::MessageStoreImpl::StoreOptions options;
- MessageStore *store;
+ boost::shared_ptr<qpid::broker::MessageStore> store;
Options* getOptions() { return &options; }
void earlyInitialize (Plugin::Target& target)
{
Broker* broker = dynamic_cast<Broker*>(&target);
- store = new mrg::msgstore::MessageStoreImpl ();
+ store.reset(new mrg::msgstore::MessageStoreImpl ());
DataDir& dataDir = broker->getDataDir ();
if (options.storeDir.empty ())
@@ -61,10 +61,15 @@
void initialize(Plugin::Target& target)
{
Broker* broker = dynamic_cast<Broker*>(&target);
- ((mrg::msgstore::MessageStoreImpl*) store)->initManagement (broker);
+ MessageStore* sp = store.get();
+ static_cast<mrg::msgstore::MessageStoreImpl*>(sp)->initManagement(broker);
}
- void finalize() { static_cast<mrg::msgstore::MessageStoreImpl*>(store)->finalize(); }
+ void finalize()
+ {
+ MessageStore* sp = store.get();
+ static_cast<mrg::msgstore::MessageStoreImpl*>(sp)->finalize();
+ }
const char* id() {return "StorePlugin";}
};
More information about the rhmessaging-commits
mailing list