diff options
Diffstat (limited to 'java/src')
-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); + } } // |