summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2003-01-31 17:29:12 +0000
committerBenoit Foucher <benoit@zeroc.com>2003-01-31 17:29:12 +0000
commit33ba7a7427b99c1512a01b84c2319c01ca05f44e (patch)
tree2a1987b89b550705f993911a59d83b3063f9d5fb /cpp/src
parentfix (diff)
downloadice-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')
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp4
-rw-r--r--cpp/src/IcePack/IcePackNode.cpp17
2 files changed, 19 insertions, 2 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index e66143c6235..c81588c93ef 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -657,7 +657,7 @@ Ice::ObjectAdapterI::newProxy(const Identity& ident) const
//
vector<EndpointPtr> endpoints;
ReferencePtr ref = _instance->referenceFactory()->create(ident, vector<string>(), Reference::ModeTwoway,
- false, _id, endpoints, 0, 0, 0, true);
+ false, _id, endpoints, 0, _locatorInfo, 0, true);
//
// Return a proxy for the reference.
@@ -689,7 +689,7 @@ Ice::ObjectAdapterI::newDirectProxy(const Identity& ident) const
// Create a reference and return a proxy for this reference.
//
ReferencePtr ref = _instance->referenceFactory()->create(ident, vector<string>(), Reference::ModeTwoway,
- false, "", endpoints, 0, 0, 0, true);
+ false, "", endpoints, 0, _locatorInfo, 0, true);
return _instance->proxyFactory()->referenceToProxy(ref);
}
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).