diff options
author | Benoit Foucher <benoit@zeroc.com> | 2003-01-31 17:29:12 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2003-01-31 17:29:12 +0000 |
commit | 33ba7a7427b99c1512a01b84c2319c01ca05f44e (patch) | |
tree | 2a1987b89b550705f993911a59d83b3063f9d5fb /cpp/src/IcePack/IcePackNode.cpp | |
parent | fix (diff) | |
download | ice-33ba7a7427b99c1512a01b84c2319c01ca05f44e.tar.bz2 ice-33ba7a7427b99c1512a01b84c2319c01ca05f44e.tar.xz ice-33ba7a7427b99c1512a01b84c2319c01ca05f44e.zip |
Set the locator info in proxies created by the object adapter.
Added seperate thread pool for the node object adapter if the registry is
collocated
Diffstat (limited to 'cpp/src/IcePack/IcePackNode.cpp')
-rw-r--r-- | cpp/src/IcePack/IcePackNode.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/IcePack/IcePackNode.cpp b/cpp/src/IcePack/IcePackNode.cpp index 740ab9888e2..1daec6a3038 100644 --- a/cpp/src/IcePack/IcePackNode.cpp +++ b/cpp/src/IcePack/IcePackNode.cpp @@ -413,6 +413,23 @@ main(int argc, char* argv[]) } // + // The node needs a different thread pool to avoid + // deadlocks in connection validation. + // + if(properties->getPropertyAsInt("IcePack.Node.ThreadPool.Size") == 0) + { + int size = properties->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 10); + + ostringstream os1; + os1 << static_cast<int>(size / 3); + properties->setProperty("IcePack.Node.ThreadPool.Size", os1.str()); + + ostringstream os2; + os2 << size - static_cast<int>(size / 3); + properties->setProperty("Ice.ThreadPool.Server.Size", os2.str()); + } + + // // Set the Ice.Default.Locator property to point to the // collocated locator (this property is passed by the // activator to each activated server). |