diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-03-14 18:47:45 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-03-14 18:47:45 +0100 |
commit | 1ec8426013773ceb6b649137b7016793065d6c44 (patch) | |
tree | bcdf2e9f0bd4eba61e08aebd61e5801e4fdf04dd /java/src/IceInternal/LocatorInfo.java | |
parent | Bug 2787 (diff) | |
download | ice-1ec8426013773ceb6b649137b7016793065d6c44.tar.bz2 ice-1ec8426013773ceb6b649137b7016793065d6c44.tar.xz ice-1ec8426013773ceb6b649137b7016793065d6c44.zip |
Fixed bug 2684 + collocation optimization bug
Diffstat (limited to 'java/src/IceInternal/LocatorInfo.java')
-rw-r--r-- | java/src/IceInternal/LocatorInfo.java | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/java/src/IceInternal/LocatorInfo.java b/java/src/IceInternal/LocatorInfo.java index 67971859ba9..40c59bbd946 100644 --- a/java/src/IceInternal/LocatorInfo.java +++ b/java/src/IceInternal/LocatorInfo.java @@ -236,7 +236,22 @@ public final class LocatorInfo public void ice_exception(Ice.LocalException ex) { - getEndpointsException(ref, ex, callback); + if(ex instanceof Ice.CollocationOptimizationException) + { + try + { + Ice.BooleanHolder cached = new Ice.BooleanHolder(); + callback.setEndpoints(getEndpoints(ref, ttl, cached), cached.value); + } + catch(Ice.LocalException e) + { + callback.setException(e); + } + } + else + { + getEndpointsException(ref, ex, callback); + } } }, adapterId); return; @@ -281,7 +296,22 @@ public final class LocatorInfo public void ice_exception(Ice.LocalException ex) { - getEndpointsException(ref, ex, callback); + if(ex instanceof Ice.CollocationOptimizationException) + { + try + { + Ice.BooleanHolder cached = new Ice.BooleanHolder(); + callback.setEndpoints(getEndpoints(ref, ttl, cached), cached.value); + } + catch(Ice.LocalException e) + { + callback.setException(e); + } + } + else + { + getEndpointsException(ref, ex, callback); + } } }, identity); return; @@ -499,12 +529,12 @@ public final class LocatorInfo _table.addProxy(ref.getIdentity(), object); } - if(ref.getInstance().traceLevels().location >= 1) - { - getEndpointsTrace(ref, endpoints, objectCached || endpointsCached); - } - - callback.setEndpoints(endpoints, objectCached || endpointsCached); + if(ref.getInstance().traceLevels().location >= 1) + { + getEndpointsTrace(ref, endpoints, objectCached || endpointsCached); + } + + callback.setEndpoints(endpoints, objectCached || endpointsCached); } public void |