diff options
author | Matthew Newhook <matthew@zeroc.com> | 2001-12-07 19:25:05 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2001-12-07 19:25:05 +0000 |
commit | 2ef59c8d043c7685b7e2ff18218c14917e093a95 (patch) | |
tree | 98c4a0d75a5b49e6f3adac09bc630c829b27b72f /cpp/src | |
parent | removed --dbdir (diff) | |
download | ice-2ef59c8d043c7685b7e2ff18218c14917e093a95.tar.bz2 ice-2ef59c8d043c7685b7e2ff18218c14917e093a95.tar.xz ice-2ef59c8d043c7685b7e2ff18218c14917e093a95.zip |
Fix reaping on shutdown problem for IceStorm.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceStorm/Server.cpp | 9 | ||||
-rw-r--r-- | cpp/src/IceStorm/TopicManagerI.h | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/cpp/src/IceStorm/Server.cpp b/cpp/src/IceStorm/Server.cpp index 2bfaa3e19c1..65d441fb49a 100644 --- a/cpp/src/IceStorm/Server.cpp +++ b/cpp/src/IceStorm/Server.cpp @@ -87,15 +87,18 @@ IceStorm::Server::runFreeze(int argc, char* argv[], const Freeze::DBEnvironmentP TraceLevelsPtr traceLevels = new TraceLevels(communicator()->getProperties()); ObjectAdapterPtr adapter = communicator()->createObjectAdapterFromProperty("TopicManager", "IceStorm.TopicManager.Endpoints"); - ObjectPtr object = new TopicManagerI(communicator(), adapter, traceLevels, dbTopicManager); - adapter->add(object, stringToIdentity("TopicManager")); + TopicManagerIPtr manager = new TopicManagerI(communicator(), adapter, traceLevels, dbTopicManager); + adapter->add(manager, stringToIdentity("TopicManager")); adapter->activate(); shutdownOnInterrupt(); communicator()->waitForShutdown(); ignoreInterrupt(); - // TODO: topic manager ::reap() + // + // It's necessary to reap all destroyed topics on shutdown. + // + manager->reap(); return EXIT_SUCCESS; } diff --git a/cpp/src/IceStorm/TopicManagerI.h b/cpp/src/IceStorm/TopicManagerI.h index 7d3ce36d80e..c006753f0e0 100644 --- a/cpp/src/IceStorm/TopicManagerI.h +++ b/cpp/src/IceStorm/TopicManagerI.h @@ -38,10 +38,10 @@ public: virtual void unsubscribe(const std::string&, const StringSeq&, const Ice::Current&); virtual void shutdown(const Ice::Current&); -private: - void reap(); +private: + void installTopic(const std::string&, const std::string&); Ice::CommunicatorPtr _communicator; @@ -52,6 +52,8 @@ private: StringBoolDict _topics; }; +typedef IceUtil::Handle<TopicManagerI> TopicManagerIPtr; + } // End namespace IceStorm #endif |