From 838347d01ccf547ed7829c7bc9810e9ef47f4c2c Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Thu, 31 Mar 2005 15:33:52 +0000 Subject: ObjectNotExistException are now always retried. --- cpp/src/Ice/ProxyFactory.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'cpp/src/Ice/ProxyFactory.cpp') diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp index 7a06429de1b..31f08404e25 100644 --- a/cpp/src/Ice/ProxyFactory.cpp +++ b/cpp/src/Ice/ProxyFactory.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -87,13 +88,23 @@ IceInternal::ProxyFactory::referenceToProxy(const ReferencePtr& ref) const } void -IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, int& cnt) const +IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, const ReferencePtr& ref, int& cnt) const { // - // We don't retry *NotExistException, which are all derived from - // RequestFailedException. + // We retry ObjectNotExistException if the reference is + // indirect. Otherwise, we don't retry other *NotExistException, + // which are all derived from RequestFailedException. // - if(dynamic_cast(&ex)) + if(dynamic_cast(&ex)) + { + IndirectReferencePtr ir = IndirectReferencePtr::dynamicCast(ref); + if(!ir || !ir->getLocatorInfo()) + { + ex.ice_throw(); + } + ir->getLocatorInfo()->clearObjectCache(ir); + } + else if(dynamic_cast(&ex)) { ex.ice_throw(); } -- cgit v1.2.3