diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-07-11 15:59:21 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-07-11 15:59:21 +0000 |
commit | dfd10ec99683b9122015d8db2a73fd0046104cd8 (patch) | |
tree | 9707459ad8a379faed17aedc7b53121c91fd168b /cpp | |
parent | Fixed a bug where locator registry was registered with the wrong identity. (diff) | |
download | ice-dfd10ec99683b9122015d8db2a73fd0046104cd8.tar.bz2 ice-dfd10ec99683b9122015d8db2a73fd0046104cd8.tar.xz ice-dfd10ec99683b9122015d8db2a73fd0046104cd8.zip |
Added implementation of setDefaultLocator().
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/CommunicatorI.cpp | 17 | ||||
-rw-r--r-- | cpp/src/Ice/CommunicatorI.h | 2 |
2 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp index 74669cc2dd4..a8e020e8a4a 100644 --- a/cpp/src/Ice/CommunicatorI.cpp +++ b/cpp/src/Ice/CommunicatorI.cpp @@ -137,12 +137,11 @@ Ice::CommunicatorI::createObjectAdapterWithEndpoints(const string& name, const s ObjectAdapterPtr adapter = _instance->objectAdapterFactory()->createObjectAdapter(name, endpts); - string locator = _instance->defaultsAndOverrides()->defaultLocator; - if(!locator.empty()) - { - adapter->setLocator(LocatorPrx::uncheckedCast(_instance->proxyFactory()->stringToProxy(locator))); - } - + // + // Set the adapter locator to this communicator default locator. + // + adapter->setLocator(_instance->referenceFactory()->getDefaultLocator()); + if(!_serverThreadPool) // Lazy initialization of _serverThreadPool. { _serverThreadPool = _instance->serverThreadPool(); @@ -256,6 +255,12 @@ Ice::CommunicatorI::setDefaultRouter(const RouterPrx& router) _instance->referenceFactory()->setDefaultRouter(router); } +void +Ice::CommunicatorI::setDefaultLocator(const LocatorPrx& locator) +{ + _instance->referenceFactory()->setDefaultLocator(locator); +} + PluginManagerPtr Ice::CommunicatorI::getPluginManager() { diff --git a/cpp/src/Ice/CommunicatorI.h b/cpp/src/Ice/CommunicatorI.h index 1f23ad33cb3..d5c59327221 100644 --- a/cpp/src/Ice/CommunicatorI.h +++ b/cpp/src/Ice/CommunicatorI.h @@ -50,6 +50,8 @@ public: virtual void setDefaultRouter(const RouterPrx&); + virtual void setDefaultLocator(const LocatorPrx&); + virtual PluginManagerPtr getPluginManager(); private: |