summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Outgoing.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-04-12 22:26:32 +0000
committerMark Spruiell <mes@zeroc.com>2005-04-12 22:26:32 +0000
commit3fd789b365ddf38af2cb2f51a424ba2e3bb679ec (patch)
treec60501f1ef699a5bfcec092ca407b56c9c6d6440 /java/src/IceInternal/Outgoing.java
parentfix for bug 218: Hang if oneways are not flushed (diff)
downloadice-3fd789b365ddf38af2cb2f51a424ba2e3bb679ec.tar.bz2
ice-3fd789b365ddf38af2cb2f51a424ba2e3bb679ec.tar.xz
ice-3fd789b365ddf38af2cb2f51a424ba2e3bb679ec.zip
completing the fix for bug 218
Diffstat (limited to 'java/src/IceInternal/Outgoing.java')
-rw-r--r--java/src/IceInternal/Outgoing.java100
1 files changed, 51 insertions, 49 deletions
diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java
index 9859932d4a4..81e945334e4 100644
--- a/java/src/IceInternal/Outgoing.java
+++ b/java/src/IceInternal/Outgoing.java
@@ -23,14 +23,7 @@ public final class Outgoing
_os = new BasicStream(ref.getInstance());
_compress = compress;
- try
- {
- writeHeader(operation, mode, context);
- }
- catch(Ice.LocalException ex)
- {
- abort(ex);
- }
+ writeHeader(operation, mode, context);
}
//
@@ -56,6 +49,7 @@ public final class Outgoing
//
public void
reset(String operation, Ice.OperationMode mode, java.util.Map context)
+ throws NonRepeatable
{
_state = StateUnsent;
_exception = null;
@@ -434,6 +428,7 @@ public final class Outgoing
private void
writeHeader(String operation, Ice.OperationMode mode, java.util.Map context)
+ throws NonRepeatable
{
switch(_reference.getMode())
{
@@ -453,52 +448,59 @@ public final class Outgoing
}
}
- _reference.getIdentity().__write(_os);
+ try
+ {
+ _reference.getIdentity().__write(_os);
- //
- // For compatibility with the old FacetPath.
- //
- String facet = _reference.getFacet();
- if(facet == null || facet.length() == 0)
- {
- _os.writeStringSeq(null);
- }
- else
- {
- String[] facetPath = { facet };
- _os.writeStringSeq(facetPath);
- }
+ //
+ // For compatibility with the old FacetPath.
+ //
+ String facet = _reference.getFacet();
+ if(facet == null || facet.length() == 0)
+ {
+ _os.writeStringSeq(null);
+ }
+ else
+ {
+ String[] facetPath = { facet };
+ _os.writeStringSeq(facetPath);
+ }
- _os.writeString(operation);
+ _os.writeString(operation);
- _os.writeByte((byte)mode.value());
+ _os.writeByte((byte)mode.value());
- if(context == null)
- {
- _os.writeSize(0);
- }
- else
- {
- final int sz = context.size();
- _os.writeSize(sz);
- if(sz > 0)
- {
- java.util.Iterator i = context.entrySet().iterator();
- while(i.hasNext())
- {
- java.util.Map.Entry entry = (java.util.Map.Entry)i.next();
- _os.writeString((String)entry.getKey());
- _os.writeString((String)entry.getValue());
- }
- }
- }
+ if(context == null)
+ {
+ _os.writeSize(0);
+ }
+ else
+ {
+ final int sz = context.size();
+ _os.writeSize(sz);
+ if(sz > 0)
+ {
+ java.util.Iterator i = context.entrySet().iterator();
+ while(i.hasNext())
+ {
+ java.util.Map.Entry entry = (java.util.Map.Entry)i.next();
+ _os.writeString((String)entry.getKey());
+ _os.writeString((String)entry.getValue());
+ }
+ }
+ }
- //
- // Input and output parameters are always sent in an
- // encapsulation, which makes it possible to forward requests as
- // blobs.
- //
- _os.startWriteEncaps();
+ //
+ // Input and output parameters are always sent in an
+ // encapsulation, which makes it possible to forward requests as
+ // blobs.
+ //
+ _os.startWriteEncaps();
+ }
+ catch(Ice.LocalException ex)
+ {
+ abort(ex);
+ }
}
private Ice.ConnectionI _connection;