diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-07-10 14:36:46 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-07-10 14:36:46 +0200 |
commit | 869aeffd3663e026f469ae373de3122bcc5ea7bb (patch) | |
tree | 6dbc8ff6a7ff515eade6f045c10f9973d61f283f /cpp/src/IceGrid/AllocatableObjectCache.cpp | |
parent | Commited fix to fix 2286 (diff) | |
download | ice-869aeffd3663e026f469ae373de3122bcc5ea7bb.tar.bz2 ice-869aeffd3663e026f469ae373de3122bcc5ea7bb.tar.xz ice-869aeffd3663e026f469ae373de3122bcc5ea7bb.zip |
Fixed bug 2292
Diffstat (limited to 'cpp/src/IceGrid/AllocatableObjectCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/AllocatableObjectCache.cpp | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/cpp/src/IceGrid/AllocatableObjectCache.cpp b/cpp/src/IceGrid/AllocatableObjectCache.cpp index 2c34d42603e..e8308ae4e8e 100644 --- a/cpp/src/IceGrid/AllocatableObjectCache.cpp +++ b/cpp/src/IceGrid/AllocatableObjectCache.cpp @@ -295,25 +295,28 @@ AllocatableObjectEntry::allocated(const SessionIPtr& session) << ")"; } - Glacier2::SessionControlPrx ctl = session->getSessionControl(); - if(ctl) + if(session->useFilters()) { - try - { - Ice::IdentitySeq seq(1); - seq.push_back(_info.proxy->ice_getIdentity()); - ctl->identities()->add(seq); - } - catch(const Ice::LocalException& ex) + Glacier2::SessionControlPrx ctl = session->getSessionControl(); + if(ctl) { - if(traceLevels && traceLevels->object > 0) + try { - Ice::Trace out(traceLevels->logger, traceLevels->objectCat); - out << "couldn't add Glacier2 filter for object `" << _info.proxy->ice_toString(); - out << "' allocated by `" << session->getId() << "':\n" << ex; - } - } - } + Ice::IdentitySeq seq(1); + seq.push_back(_info.proxy->ice_getIdentity()); + ctl->identities()->add(seq); + } + catch(const Ice::LocalException& ex) + { + if(traceLevels && traceLevels->object > 0) + { + Ice::Trace out(traceLevels->logger, traceLevels->objectCat); + out << "couldn't add Glacier2 filter for object `" << _info.proxy->ice_toString(); + out << "' allocated by `" << session->getId() << "':\n" << ex; + } + } + } + } } void @@ -326,23 +329,26 @@ AllocatableObjectEntry::released(const SessionIPtr& session) TraceLevelsPtr traceLevels = _cache.getTraceLevels(); - Glacier2::SessionControlPrx ctl = session->getSessionControl(); - if(ctl) + if(session->useFilters()) { - try - { - Ice::IdentitySeq seq(1); - seq.push_back(_info.proxy->ice_getIdentity()); - ctl->identities()->remove(seq); - } - catch(const Ice::LocalException& ex) + Glacier2::SessionControlPrx ctl = session->getSessionControl(); + if(ctl) { - if(traceLevels && traceLevels->object > 0) + try + { + Ice::IdentitySeq seq(1); + seq.push_back(_info.proxy->ice_getIdentity()); + ctl->identities()->remove(seq); + } + catch(const Ice::LocalException& ex) { - Ice::Trace out(traceLevels->logger, traceLevels->objectCat); - out << "couldn't remove Glacier2 filter for object `" << _info.proxy->ice_toString(); - out << "' allocated by `" << session->getId() << "':\n" << ex; - } + if(traceLevels && traceLevels->object > 0) + { + Ice::Trace out(traceLevels->logger, traceLevels->objectCat); + out << "couldn't remove Glacier2 filter for object `" << _info.proxy->ice_toString(); + out << "' allocated by `" << session->getId() << "':\n" << ex; + } + } } } |