diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-10-09 16:03:12 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-10-09 16:03:12 -0230 |
commit | 0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e (patch) | |
tree | b9836942ec10171075ddbeb2c68dd529da746e0c /java/src/IceInternal/Instance.java | |
parent | Windows TP README updates (diff) | |
download | ice-0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e.tar.bz2 ice-0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e.tar.xz ice-0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e.zip |
ICE-5671 make sure router/locator have not already been set by plugin loading
Diffstat (limited to 'java/src/IceInternal/Instance.java')
-rw-r--r-- | java/src/IceInternal/Instance.java | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/java/src/IceInternal/Instance.java b/java/src/IceInternal/Instance.java index 00b12778726..900784eafd5 100644 --- a/java/src/IceInternal/Instance.java +++ b/java/src/IceInternal/Instance.java @@ -1100,20 +1100,27 @@ public final class Instance _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. // - Ice.RouterPrx router = Ice.RouterPrxHelper.uncheckedCast(_proxyFactory.propertyToProxy("Ice.Default.Router")); - if(router != null) + if(_referenceFactory.getDefaultRouter() == null) { - _referenceFactory = _referenceFactory.setDefaultRouter(router); + Ice.RouterPrx router = + Ice.RouterPrxHelper.uncheckedCast(_proxyFactory.propertyToProxy("Ice.Default.Router")); + if(router != null) + { + _referenceFactory = _referenceFactory.setDefaultRouter(router); + } } - Ice.LocatorPrx loc = Ice.LocatorPrxHelper.uncheckedCast(_proxyFactory.propertyToProxy("Ice.Default.Locator")); - if(loc != null) + if(_referenceFactory.getDefaultLocator() == null) { - _referenceFactory = _referenceFactory.setDefaultLocator(loc); + Ice.LocatorPrx loc = + Ice.LocatorPrxHelper.uncheckedCast(_proxyFactory.propertyToProxy("Ice.Default.Locator")); + if(loc != null) + { + _referenceFactory = _referenceFactory.setDefaultLocator(loc); + } } // |