diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a14a07f16c4..46e86c10b3e 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1553,20 +1553,25 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[], const Ice::Communica _clientThreadPool = new ThreadPool(this, "Ice.ThreadPool.Client", 0); // - // Get default router and locator proxies. Don't move this - // initialization before the plug-in initialization!!! The proxies - // might depend on endpoint factories to be installed by plug-ins. + // The default router/locator may have been set during the loading of plugins. + // Therefore we make sure it is not already set before checking the property. // - RouterPrx router = RouterPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Router")); - if(router) + if(!_referenceFactory->getDefaultRouter()) { - _referenceFactory = _referenceFactory->setDefaultRouter(router); + RouterPrx router = RouterPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Router")); + if(router) + { + _referenceFactory = _referenceFactory->setDefaultRouter(router); + } } - LocatorPrx locator = LocatorPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Locator")); - if(locator) + if(!_referenceFactory->getDefaultLocator()) { - _referenceFactory = _referenceFactory->setDefaultLocator(locator); + LocatorPrx locator = LocatorPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Locator")); + if(locator) + { + _referenceFactory = _referenceFactory->setDefaultLocator(locator); + } } // |