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/LocatorInfo.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/LocatorInfo.cpp')
-rw-r--r-- | cpp/src/Ice/LocatorInfo.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp index 50e16b9ef32..91531d24648 100644 --- a/cpp/src/Ice/LocatorInfo.cpp +++ b/cpp/src/Ice/LocatorInfo.cpp @@ -17,7 +17,6 @@ #include <Ice/Reference.h> #include <Ice/Functional.h> #include <Ice/IdentityUtil.h> - #include <iterator> using namespace std; @@ -185,7 +184,6 @@ void IceInternal::LocatorTable::addProxy(const Identity& id, const ObjectPrx& proxy) { IceUtil::Mutex::Lock sync(*this); - _objectMap.insert(make_pair(id, proxy)); } @@ -201,9 +199,7 @@ IceInternal::LocatorTable::removeProxy(const Identity& id) } ObjectPrx proxy = p->second; - _objectMap.erase(p); - return proxy; } @@ -294,18 +290,20 @@ IceInternal::LocatorInfo::getEndpoints(const IndirectReferencePtr& ref, bool& ca } else { + bool objectCached = true; if(!_table->getProxy(ref->getIdentity(), object)) { - cached = false; - + objectCached = false; object = _locator->findObjectById(ref->getIdentity()); } + bool endpointsCached = true; if(object) { DirectReferencePtr odr = DirectReferencePtr::dynamicCast(object->__reference()); if(odr) { + endpointsCached = false; endpoints = odr->getEndpoints(); } else @@ -314,15 +312,17 @@ IceInternal::LocatorInfo::getEndpoints(const IndirectReferencePtr& ref, bool& ca assert(oir); if(!oir->getAdapterId().empty()) { - endpoints = getEndpoints(oir, cached); + endpoints = getEndpoints(oir, endpointsCached); } } } - if(!cached && !endpoints.empty()) + if(!objectCached && !endpoints.empty()) { _table->addProxy(ref->getIdentity(), object); } + + cached = objectCached || endpointsCached; } } catch(const AdapterNotFoundException&) |