summaryrefslogtreecommitdiff
path: root/java/src/Ice/ObjectPrxHelperBase.java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-03-14 12:47:12 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-03-14 12:47:12 +0000
commit4ec329c60555de5562c72df0e2fc583d591bf84d (patch)
tree86eb4af9aac33fc6277bed19d8936c4ffdbcd2d5 /java/src/Ice/ObjectPrxHelperBase.java
parentFixed http://www.zeroc.com/vbulletin/showthread.php?p=9533#post9533 (diff)
downloadice-4ec329c60555de5562c72df0e2fc583d591bf84d.tar.bz2
ice-4ec329c60555de5562c72df0e2fc583d591bf84d.tar.xz
ice-4ec329c60555de5562c72df0e2fc583d591bf84d.zip
Ported fix for bug 574.
Diffstat (limited to 'java/src/Ice/ObjectPrxHelperBase.java')
-rw-r--r--java/src/Ice/ObjectPrxHelperBase.java54
1 files changed, 39 insertions, 15 deletions
diff --git a/java/src/Ice/ObjectPrxHelperBase.java b/java/src/Ice/ObjectPrxHelperBase.java
index 125e227438e..98fd2b40044 100644
--- a/java/src/Ice/ObjectPrxHelperBase.java
+++ b/java/src/Ice/ObjectPrxHelperBase.java
@@ -56,9 +56,9 @@ public class ObjectPrxHelperBase implements ObjectPrx
_ObjectDel __del = __getDelegate();
return __del.ice_isA(__id, __context);
}
- catch(IceInternal.NonRepeatable __ex)
+ catch(IceInternal.LocalExceptionWrapper __ex)
{
- __cnt = __handleException(__ex.get(), __cnt);
+ __cnt = __handleExceptionWrapperRelaxed(__ex, __cnt);
}
catch(LocalException __ex)
{
@@ -86,9 +86,9 @@ public class ObjectPrxHelperBase implements ObjectPrx
__del.ice_ping(__context);
return;
}
- catch(IceInternal.NonRepeatable __ex)
+ catch(IceInternal.LocalExceptionWrapper __ex)
{
- __cnt = __handleException(__ex.get(), __cnt);
+ __cnt = __handleExceptionWrapperRelaxed(__ex, __cnt);
}
catch(LocalException __ex)
{
@@ -115,9 +115,9 @@ public class ObjectPrxHelperBase implements ObjectPrx
_ObjectDel __del = __getDelegate();
return __del.ice_ids(__context);
}
- catch(IceInternal.NonRepeatable __ex)
+ catch(IceInternal.LocalExceptionWrapper __ex)
{
- __cnt = __handleException(__ex.get(), __cnt);
+ __cnt = __handleExceptionWrapperRelaxed(__ex, __cnt);
}
catch(LocalException __ex)
{
@@ -144,9 +144,9 @@ public class ObjectPrxHelperBase implements ObjectPrx
_ObjectDel __del = __getDelegate();
return __del.ice_id(__context);
}
- catch(IceInternal.NonRepeatable __ex)
+ catch(IceInternal.LocalExceptionWrapper __ex)
{
- __cnt = __handleException(__ex.get(), __cnt);
+ __cnt = __handleExceptionWrapperRelaxed(__ex, __cnt);
}
catch(LocalException __ex)
{
@@ -173,15 +173,15 @@ public class ObjectPrxHelperBase implements ObjectPrx
_ObjectDel __del = __getDelegate();
return __del.ice_invoke(operation, mode, inParams, outParams, context);
}
- catch(IceInternal.NonRepeatable __ex)
+ catch(IceInternal.LocalExceptionWrapper __ex)
{
if(mode == OperationMode.Nonmutating || mode == OperationMode.Idempotent)
{
- __cnt = __handleException(__ex.get(), __cnt);
+ __cnt = __handleExceptionWrapperRelaxed(__ex, __cnt);
}
else
{
- __rethrowException(__ex.get());
+ __handleExceptionWrapper(__ex);
}
}
catch(LocalException __ex)
@@ -723,11 +723,35 @@ public class ObjectPrxHelperBase implements ObjectPrx
}
}
- public final synchronized void
- __rethrowException(LocalException ex)
+ public final void
+ __handleExceptionWrapper(IceInternal.LocalExceptionWrapper ex)
{
- _delegate = null;
- throw ex;
+ synchronized(this)
+ {
+ _delegate = null;
+ }
+
+ if(!ex.retry())
+ {
+ throw ex.get();
+ }
+ }
+
+ public final int
+ __handleExceptionWrapperRelaxed(IceInternal.LocalExceptionWrapper ex, int cnt)
+ {
+ if(!ex.retry())
+ {
+ return __handleException(ex.get(), cnt);
+ }
+ else
+ {
+ synchronized(this)
+ {
+ _delegate = null;
+ }
+ return cnt;
+ }
}
public final void