示例#1
0
        public int handleExceptionWrapper__(ObjectDel_ @delegate, IceInternal.LocalExceptionWrapper ex,
                                            InvocationObserver obsv)
        {
            lock(this)
            {
                if(@delegate == _delegate)
                {
                    _delegate = null;
                }
            }

            if(!ex.retry())
            {
                if(obsv != null)
                {
                    obsv.failed(ex.get().ice_name());
                }
                throw ex.get();
            }

            return 0;
        }
示例#2
0
        public int handleException__(ObjectDel_ @delegate, LocalException ex, bool sleep, ref int cnt, 
                                     InvocationObserver obsv)
        {
            //
            // Only _delegate needs to be mutex protected here.
            //
            lock(this)
            {
                if(@delegate == _delegate)
                {
                    _delegate = null;
                }
            }

            try
            {
                if(cnt == -1) // Don't retry if the retry count is -1.
                {
                    throw ex;
                }
                
                int interval;
                try
                {
                    interval = _reference.getInstance().proxyFactory().checkRetryAfterException(ex, _reference, sleep,
                                                                                                ref cnt);
                }
                catch(CommunicatorDestroyedException)
                {
                    //
                    // The communicator is already destroyed, so we cannot
                    // retry.
                    //
                    throw ex;
                }
                if(obsv != null)
                {
                    obsv.retried();
                }
                return interval;
            }
            catch(Ice.LocalException e)
            {
                if(obsv != null)
                {
                    obsv.failed(e.ice_name());
                }
                throw;
            }
        }