diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/Ice/src/main/java/IceInternal/ObjectAdapterFactory.java | 2 | ||||
-rw-r--r-- | java/src/IceGridGUI/src/main/java/IceGridGUI/Coordinator.java | 29 |
2 files changed, 24 insertions, 7 deletions
diff --git a/java/src/Ice/src/main/java/IceInternal/ObjectAdapterFactory.java b/java/src/Ice/src/main/java/IceInternal/ObjectAdapterFactory.java index a723537cd7e..bd695f1a396 100644 --- a/java/src/Ice/src/main/java/IceInternal/ObjectAdapterFactory.java +++ b/java/src/Ice/src/main/java/IceInternal/ObjectAdapterFactory.java @@ -151,7 +151,7 @@ public final class ObjectAdapterFactory if(_instance == null) { - throw new Ice.ObjectAdapterDeactivatedException(); + throw new Ice.CommunicatorDestroyedException(); } Ice.ObjectAdapterI adapter = null; diff --git a/java/src/IceGridGUI/src/main/java/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/src/main/java/IceGridGUI/Coordinator.java index f2889e2ee2a..73d5fdb8310 100644 --- a/java/src/IceGridGUI/src/main/java/IceGridGUI/Coordinator.java +++ b/java/src/IceGridGUI/src/main/java/IceGridGUI/Coordinator.java @@ -2071,15 +2071,32 @@ public class Coordinator // // If the registry to use is the locator local registry, we install a default router // to ensure we'll use a single connection regardless of the endpoints returned in the - // proxies of the various session/admin methods (useful if used over an ssh tunnel). + // proxies of the various session/admin methods (useful if used over a ssh tunnel). // if(cb.getRegistry().ice_getIdentity().equals(cb.getCurrentRegistry().ice_getIdentity())) { - Ice.ObjectAdapter colloc = _communicator.createObjectAdapter(""); - Ice.ObjectPrx router = colloc.addWithUUID(new ReuseConnectionRouter(cb.getLocator())); - _communicator.setDefaultRouter(Ice.RouterPrxHelper.uncheckedCast(router)); - cb.setRegistry(RegistryPrxHelper.uncheckedCast(cb.getRegistry().ice_router( - _communicator.getDefaultRouter()))); + try + { + Ice.ObjectAdapter colloc = _communicator.createObjectAdapter(""); + Ice.ObjectPrx router = colloc.addWithUUID(new ReuseConnectionRouter(cb.getLocator())); + _communicator.setDefaultRouter(Ice.RouterPrxHelper.uncheckedCast(router)); + cb.setRegistry(RegistryPrxHelper.uncheckedCast(cb.getRegistry().ice_router( + _communicator.getDefaultRouter()))); + } + catch(final Ice.LocalException e) + { + SwingUtilities.invokeLater(new Runnable() + { + @Override + public void run() + { + JOptionPane.showMessageDialog(parent, "Could not create session: " + e.toString(), + "Login failed", JOptionPane.ERROR_MESSAGE); + cb.loginFailed(); + } + }); + return; + } } do { |