diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-03-31 15:33:52 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-03-31 15:33:52 +0000 |
commit | 838347d01ccf547ed7829c7bc9810e9ef47f4c2c (patch) | |
tree | e8ceac7a34a721a9f4179fd8ea3617e9ea4446e0 /cpp/src/Ice/ProxyFactory.cpp | |
parent | merge from R2_1_branch to get windows installers automation changes (diff) | |
download | ice-838347d01ccf547ed7829c7bc9810e9ef47f4c2c.tar.bz2 ice-838347d01ccf547ed7829c7bc9810e9ef47f4c2c.tar.xz ice-838347d01ccf547ed7829c7bc9810e9ef47f4c2c.zip |
ObjectNotExistException are now always retried.
Diffstat (limited to 'cpp/src/Ice/ProxyFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ProxyFactory.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
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 <Ice/Instance.h> #include <Ice/Proxy.h> #include <Ice/ReferenceFactory.h> +#include <Ice/LocatorInfo.h> #include <Ice/BasicStream.h> #include <Ice/Properties.h> #include <Ice/LoggerUtil.h> @@ -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<const RequestFailedException*>(&ex)) + if(dynamic_cast<const ObjectNotExistException*>(&ex)) + { + IndirectReferencePtr ir = IndirectReferencePtr::dynamicCast(ref); + if(!ir || !ir->getLocatorInfo()) + { + ex.ice_throw(); + } + ir->getLocatorInfo()->clearObjectCache(ir); + } + else if(dynamic_cast<const RequestFailedException*>(&ex)) { ex.ice_throw(); } |