diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-10-19 10:09:17 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-10-19 10:09:17 +0200 |
commit | 93d471f6833a51e247bcff4962aaa051c5e19b12 (patch) | |
tree | 39837bd28960f1a589009640458f6ddecd8aaa1e /cpp/src | |
parent | ICE-4379 - marshaling order of C# stacks (diff) | |
download | ice-93d471f6833a51e247bcff4962aaa051c5e19b12.tar.bz2 ice-93d471f6833a51e247bcff4962aaa051c5e19b12.tar.xz ice-93d471f6833a51e247bcff4962aaa051c5e19b12.zip |
Fixed ICE-4817: set default ACM timeout on registry OAs
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/RegistryI.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index d28f8b5b92e..08d844a608f 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -234,17 +234,48 @@ RegistryI::startImpl() properties->setProperty("IceGrid.Registry.Client.AdapterId", ""); properties->setProperty("IceGrid.Registry.Server.AdapterId", ""); properties->setProperty("IceGrid.Registry.SessionManager.AdapterId", ""); + properties->setProperty("IceGrid.Registry.AdminSessionManager.AdapterId", ""); properties->setProperty("IceGrid.Registry.Internal.AdapterId", ""); setupThreadPool(properties, "IceGrid.Registry.Client.ThreadPool", 1, 10); setupThreadPool(properties, "IceGrid.Registry.Server.ThreadPool", 1, 10, true); // Serialize for admin callbacks setupThreadPool(properties, "IceGrid.Registry.SessionManager.ThreadPool", 1, 10); + setupThreadPool(properties, "IceGrid.Registry.AdminSessionManager.ThreadPool", 1, 10); setupThreadPool(properties, "IceGrid.Registry.Internal.ThreadPool", 1, 100); _replicaName = properties->getPropertyWithDefault("IceGrid.Registry.ReplicaName", "Master"); _master = _replicaName == "Master"; _sessionTimeout = properties->getPropertyAsIntWithDefault("IceGrid.Registry.SessionTimeout", 30); + if(properties->getProperty("IceGrid.Registry.Client.ACM").empty()) + { + // + // Set the client object adapter ACM timeout to the session + // timeout * 2. If no session timeout is set, ACM is disabled. + // + ostringstream os; + os << _sessionTimeout * 2; + properties->setProperty("IceGrid.Registry.Client.ACM", os.str()); + } + if(properties->getProperty("IceGrid.Registry.Server.ACM").empty()) + { + properties->setProperty("IceGrid.Registry.Server.ACM", "30"); + } + if(properties->getProperty("IceGrid.Registry.Internal.ACM").empty()) + { + int nt = properties->getPropertyAsIntWithDefault("IceGrid.Registry.NodeSessionTimeout", 30); + int rt = properties->getPropertyAsIntWithDefault("IceGrid.Registry.ReplicaSessionTimeout", 30); + + // + // Set the internal object adapter ACM timeout to the replica + // or node session timeout * 2. If no session timeout is set, + // ACM is disabled. + // + ostringstream os; + os << std::max(nt, rt) * 2; + properties->setProperty("IceGrid.Registry.Internal.ACM", os.str()); + } + if(!_master && properties->getProperty("Ice.Default.Locator").empty()) { if(properties->getProperty("Ice.Default.Locator").empty()) |