diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/Ice/_ObjectDelD.java | 15 | ||||
-rw-r--r-- | java/src/IceInternal/Direct.java | 8 | ||||
-rw-r--r-- | java/src/IceInternal/Incoming.java | 22 | ||||
-rw-r--r-- | java/src/IceInternal/Outgoing.java | 13 |
4 files changed, 46 insertions, 12 deletions
diff --git a/java/src/Ice/_ObjectDelD.java b/java/src/Ice/_ObjectDelD.java index 3e527ce6971..598320d2257 100644 --- a/java/src/Ice/_ObjectDelD.java +++ b/java/src/Ice/_ObjectDelD.java @@ -189,15 +189,14 @@ public class _ObjectDelD implements _ObjectDel } public boolean - ice_invoke(String operation, boolean nonmutating, byte[] inParams, ByteSeqHolder outParams, - java.util.Map __context) + ice_invoke(String operation, boolean nonmutating, byte[] inParams, ByteSeqHolder outParams, java.util.Map context) throws LocationForward, IceInternal.NonRepeatable { - Current __current = new Current(); - __initCurrent(__current, operation, nonmutating, __context); + Current current = new Current(); + __initCurrent(current, operation, nonmutating, context); while (true) { - IceInternal.Direct __direct = new IceInternal.Direct(__adapter, __current); + IceInternal.Direct __direct = new IceInternal.Direct(__adapter, current); try { Blobject __servant = null; @@ -207,11 +206,13 @@ public class _ObjectDelD implements _ObjectDel } catch (ClassCastException ex) { - throw new OperationNotExistException(); + OperationNotExistException opEx = new OperationNotExistException(); + opEx.operation = current.operation; + throw opEx; } try { - return __servant.ice_invoke(inParams, outParams, __current); + return __servant.ice_invoke(inParams, outParams, current); } catch (LocalException ex) { diff --git a/java/src/IceInternal/Direct.java b/java/src/IceInternal/Direct.java index 5e95b60be29..95f27db92b8 100644 --- a/java/src/IceInternal/Direct.java +++ b/java/src/IceInternal/Direct.java @@ -47,7 +47,9 @@ public final class Direct _facetServant = _servant.ice_findFacet(_current.facet); if (_facetServant == null) { - throw new Ice.FacetNotExistException(); + Ice.FacetNotExistException ex = new Ice.FacetNotExistException(); + ex.facet = _current.facet; + throw ex; } } } @@ -62,7 +64,9 @@ public final class Direct if (_servant == null) { - throw new Ice.ObjectNotExistException(); + Ice.ObjectNotExistException ex = new Ice.ObjectNotExistException(); + ex.identity = _current.identity; + throw ex; } } diff --git a/java/src/IceInternal/Incoming.java b/java/src/IceInternal/Incoming.java index 46b0321c7a8..35dc68b131c 100644 --- a/java/src/IceInternal/Incoming.java +++ b/java/src/IceInternal/Incoming.java @@ -130,6 +130,19 @@ public class Incoming { _os.resize(statusPos, false); _os.writeByte((byte)status.value()); + + if (status == DispatchStatus.DispatchObjectNotExist) + { + _current.identity.__write(_os); + } + else if(status == DispatchStatus.DispatchFacetNotExist) + { + _os.writeString(_current.facet); + } + else if(status == DispatchStatus.DispatchOperationNotExist) + { + _os.writeString(_current.operation); + } } else { @@ -171,6 +184,9 @@ public class Incoming _os.endWriteEncaps(); _os.resize(statusPos, false); _os.writeByte((byte)DispatchStatus._DispatchObjectNotExist); + // Not current.identity.__write(_os), so that the + // identity can be overwritten. + ex.identity.__write(_os); } } catch (Ice.FacetNotExistException ex) @@ -187,6 +203,9 @@ public class Incoming _os.endWriteEncaps(); _os.resize(statusPos, false); _os.writeByte((byte)DispatchStatus._DispatchFacetNotExist); + // Not _os.write(current.facet), so that the identity + // can be overwritten. + _os.writeString(ex.facet); } } catch (Ice.OperationNotExistException ex) @@ -203,6 +222,9 @@ public class Incoming _os.endWriteEncaps(); _os.resize(statusPos, false); _os.writeByte((byte)DispatchStatus._DispatchOperationNotExist); + // Not _os.write(current.operation), so that the + // identity can be overwritten. + _os.writeString(ex.operation); } } catch (Ice.LocalException ex) diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java index b94930de7e8..3581303a34c 100644 --- a/java/src/IceInternal/Outgoing.java +++ b/java/src/IceInternal/Outgoing.java @@ -222,7 +222,10 @@ public final class Outgoing case DispatchStatus._DispatchObjectNotExist: { _state = StateLocalException; - _exception = new Ice.ObjectNotExistException(); + Ice.ObjectNotExistException ex = new Ice.ObjectNotExistException(); + ex.identity = new Ice.Identity(); + ex.identity.__read(_is); + _exception = ex; _fillStackTrace = true; break; } @@ -230,7 +233,9 @@ public final class Outgoing case DispatchStatus._DispatchFacetNotExist: { _state = StateLocalException; - _exception = new Ice.FacetNotExistException(); + Ice.FacetNotExistException ex = new Ice.FacetNotExistException(); + ex.facet = _is.readString(); + _exception = ex; _fillStackTrace = true; break; } @@ -238,7 +243,9 @@ public final class Outgoing case DispatchStatus._DispatchOperationNotExist: { _state = StateLocalException; - _exception = new Ice.OperationNotExistException(); + Ice.OperationNotExistException ex = new Ice.OperationNotExistException(); + ex.operation = _is.readString(); + _exception = ex; _fillStackTrace = true; break; } |