diff options
Diffstat (limited to 'java/src/Ice/ObjectPrxHelperBase.java')
-rw-r--r-- | java/src/Ice/ObjectPrxHelperBase.java | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/java/src/Ice/ObjectPrxHelperBase.java b/java/src/Ice/ObjectPrxHelperBase.java index 87c3b86f3d2..4269def1407 100644 --- a/java/src/Ice/ObjectPrxHelperBase.java +++ b/java/src/Ice/ObjectPrxHelperBase.java @@ -790,8 +790,8 @@ public class ObjectPrxHelperBase implements ObjectPrx try { __del = __getDelegate(false); - // Wait for the connection to be established. - return __del.__getRequestHandler().getConnection(true); + return __del.__getRequestHandler().getConnection(true); // Wait for the connection to be established. + } catch(LocalException __ex) { @@ -826,24 +826,21 @@ public class ObjectPrxHelperBase implements ObjectPrx public void ice_flushBatchRequests() { - int __cnt = 0; - while(true) + // + // We don't automatically retry if ice_flushBatchRequests fails. Otherwise, if some batch + // requests were queued with the connection, they would be lost without being noticed. + // + _ObjectDel __del = null; + int __cnt = -1; // Don't retry. + try { - _ObjectDel __del = null; - try - { - __del = __getDelegate(false); - __del.ice_flushBatchRequests(); - return; - } - catch(IceInternal.LocalExceptionWrapper __ex) - { - __handleExceptionWrapper(__del, __ex); - } - catch(LocalException __ex) - { - __cnt = __handleException(__del, __ex, __cnt); - } + __del = __getDelegate(false); + __del.ice_flushBatchRequests(); + return; + } + catch(LocalException __ex) + { + __cnt = __handleException(__del, __ex, __cnt); } } @@ -949,6 +946,11 @@ public class ObjectPrxHelperBase implements ObjectPrx } } + if(cnt == -1) // Don't retry if the retry count is -1. + { + throw ex; + } + IceInternal.ProxyFactory proxyFactory; try { |