diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-09-04 19:39:59 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-09-04 19:39:59 +0000 |
commit | 1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268 (patch) | |
tree | cd87f8121980159fdafd6b01e6802ea594478b93 /cpp/src/IceGrid/IceGridRegistry.cpp | |
parent | icegridadmin always uses routed config if possible. added error messages if (diff) | |
download | ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.tar.bz2 ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.tar.xz ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.zip |
Improved observers, refactored topic manager and initialization Added
icegridadmin commands to examine the registries
Diffstat (limited to 'cpp/src/IceGrid/IceGridRegistry.cpp')
-rw-r--r-- | cpp/src/IceGrid/IceGridRegistry.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp index 84254abb22e..b83cc370d10 100644 --- a/cpp/src/IceGrid/IceGridRegistry.cpp +++ b/cpp/src/IceGrid/IceGridRegistry.cpp @@ -11,11 +11,11 @@ #include <Ice/Ice.h> #include <Ice/Service.h> #include <IceGrid/RegistryI.h> +#include <IceGrid/TraceLevels.h> #ifdef __BCPLUSPLUS__ # include <IceGrid/AdminSessionI.h> # include <IceGrid/WaitQueue.h> # include <IceGrid/ReapThread.h> -# include <IceGrid/TraceLevels.h> # include <IceGrid/Database.h> #endif @@ -35,6 +35,7 @@ public: protected: virtual bool start(int, char*[]); + virtual void waitForShutdown(); virtual bool stop(); virtual CommunicatorPtr initializeCommunicator(int&, char*[], const InitializationData&); @@ -91,17 +92,21 @@ RegistryService::start(int argc, char* argv[]) return false; } + Ice::PropertiesPtr properties = communicator()->getProperties(); + // // Warn the user that setting Ice.ThreadPool.Server isn't useful. // - if(!nowarn && communicator()->getProperties()->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 0) > 0) + if(!nowarn && properties->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 0) > 0) { Warning out(communicator()->getLogger()); out << "setting `Ice.ThreadPool.Server.Size' is not useful,\n"; out << "you should set individual adapter thread pools instead."; } + + TraceLevelsPtr traceLevels = new TraceLevels(communicator(), "IceGrid.Registry"); - _registry = new RegistryI(communicator()); + _registry = new RegistryI(communicator(), traceLevels); if(!_registry->start(nowarn)) { return false; @@ -110,6 +115,18 @@ RegistryService::start(int argc, char* argv[]) return true; } +void +RegistryService::waitForShutdown() +{ + // + // Wait for the activator shutdown. Once the run method returns + // all the servers have been deactivated. + // + enableInterrupt(); + _registry->waitForShutdown(); + disableInterrupt(); +} + bool RegistryService::stop() { |