diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-09-15 15:29:05 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-09-15 15:29:05 +0000 |
commit | cc25d4e822f650e4d947b27a173c01de543738b4 (patch) | |
tree | be3fde742978e351c3bcc0a8118a99752396499d /cpp/src/IceGrid/ServerCache.cpp | |
parent | Code cleanup (diff) | |
download | ice-cc25d4e822f650e4d947b27a173c01de543738b4.tar.bz2 ice-cc25d4e822f650e4d947b27a173c01de543738b4.tar.xz ice-cc25d4e822f650e4d947b27a173c01de543738b4.zip |
More code cleanup + added replica session timeout
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerCache.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index 333aa7f34a0..ccf1731384d 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -63,14 +63,12 @@ ServerCache::ServerCache(const Ice::CommunicatorPtr& communicator, NodeCache& nodeCache, AdapterCache& adapterCache, ObjectCache& objectCache, - AllocatableObjectCache& allocatableObjectCache, - int sessionTimeout) : + AllocatableObjectCache& allocatableObjectCache) : _communicator(communicator), _nodeCache(nodeCache), _adapterCache(adapterCache), _objectCache(objectCache), - _allocatableObjectCache(allocatableObjectCache), - _sessionTimeout(sessionTimeout) + _allocatableObjectCache(allocatableObjectCache) { } @@ -652,16 +650,10 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i // _loaded = _load; assert(_loaded.get()); - int timeout = _cache.getSessionTimeout() * 1000; // sec to ms - _proxy = ServerPrx::uncheckedCast(proxy->ice_timeout(timeout)->ice_collocationOptimized(false)); - _adapters.clear(); - for(AdapterPrxDict::const_iterator p = adpts.begin(); p != adpts.end(); ++p) - { - Ice::ObjectPrx adapter = p->second->ice_timeout(timeout)->ice_collocationOptimized(false); - _adapters.insert(make_pair(p->first, AdapterPrx::uncheckedCast(adapter))); - } - _activationTimeout = at + timeout; - _deactivationTimeout = dt + timeout; + _proxy = proxy; + _adapters = adpts; + _activationTimeout = at; + _deactivationTimeout = dt; assert(!_destroy.get() && !_load.get()); _synchronizing = false; |