diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-10-28 17:04:10 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-10-28 17:04:10 -0400 |
commit | 2c474e35fbc38faa8e2c735bfafd0987d61794e8 (patch) | |
tree | 7997fae367f7785c7f0a97c147f9f174a6b0f173 /java/src | |
parent | Describe deprecated APIs removed in 3.6 (diff) | |
download | ice-2c474e35fbc38faa8e2c735bfafd0987d61794e8.tar.bz2 ice-2c474e35fbc38faa8e2c735bfafd0987d61794e8.tar.xz ice-2c474e35fbc38faa8e2c735bfafd0987d61794e8.zip |
Fixed ICE-5676: changed OA create exception to CommunicatorDestroyedException + better error handling in IceGrid GUI
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 { |