diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-04-28 16:24:03 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-04-28 16:24:03 +0000 |
commit | bf3729b95ca9928b07babe4f1216883cdc37086b (patch) | |
tree | 1a8b2720f3200f4bf705d4d4c12dddcf064be6bf /cpp/src/IceGrid/ObjectCache.cpp | |
parent | Adding warning comments about changing toString() behaviors that may break (diff) | |
download | ice-bf3729b95ca9928b07babe4f1216883cdc37086b.tar.bz2 ice-bf3729b95ca9928b07babe4f1216883cdc37086b.tar.xz ice-bf3729b95ca9928b07babe4f1216883cdc37086b.zip |
More allocation fixes, removed session based Query interface.
Diffstat (limited to 'cpp/src/IceGrid/ObjectCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/ObjectCache.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/ObjectCache.cpp b/cpp/src/IceGrid/ObjectCache.cpp index af73a11450d..915246b7b52 100644 --- a/cpp/src/IceGrid/ObjectCache.cpp +++ b/cpp/src/IceGrid/ObjectCache.cpp @@ -109,7 +109,7 @@ ObjectCache::add(const AllocatablePtr& parent, const string& app, const string& { p = _types.insert(p, make_pair(entry->getType(), TypeEntry(*this))); } - p->second.add(entry->getProxy()); + p->second.add(info.proxy); if(_traceLevels && _traceLevels->object > 0) { @@ -140,7 +140,7 @@ ObjectCache::remove(const Ice::Identity& id) map<string, TypeEntry>::iterator p = _types.find(entry->getType()); assert(p != _types.end()); - if(p->second.remove(entry->getProxy())) + if(p->second.remove(entry->getObjectInfo().proxy)) { _types.erase(p); } @@ -262,7 +262,7 @@ ObjectCache::getObjectsByType(const string& type) ObjectEntryPtr entry = getImpl((*q)->ice_getIdentity()); if(!entry->allocatable()) { - proxies.push_back(entry->getProxy()); + proxies.push_back(*q); } } return proxies; @@ -319,9 +319,16 @@ ObjectEntry::set(const AllocatablePtr& parent, const string& app, const ObjectIn } Ice::ObjectPrx -ObjectEntry::getProxy() const +ObjectEntry::getProxy(const SessionIPtr& session) const { - return _info.proxy; + if(allocatable()) + { + return getSession() == session ? _info.proxy : Ice::ObjectPrx(); + } + else + { + return _info.proxy; + } } string |