diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-16 09:02:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 09:02:21 +0100 |
commit | 025e26967c8e5232a612e4a62a125945cfaf5155 (patch) | |
tree | cded166c6c7926821401aa74020a12d3bb36996a /cpp | |
parent | Build PHP/Python on Windows only with v140 (diff) | |
parent | Fix updating runtime properties for services using shared communicator (diff) | |
download | ice-025e26967c8e5232a612e4a62a125945cfaf5155.tar.bz2 ice-025e26967c8e5232a612e4a62a125945cfaf5155.tar.xz ice-025e26967c8e5232a612e4a62a125945cfaf5155.zip |
Merge pull request #14 from AndiDog/feature/fix-updating-props-shared-communicator
Fix updating runtime properties for services using shared communicator
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 17 | ||||
-rw-r--r-- | cpp/test/IceGrid/noRestartUpdate/AllTests.cpp | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 1ac85f57a0d..7102acf6e28 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -328,7 +328,22 @@ private: { assert(_p->first.find("config_") == 0); const string service = _p->first.substr(7); - facet = "IceBox.Service." + service + ".Properties"; + bool useSharedCommunicator = false; + for (PropertyDescriptorSeq::const_iterator d = _properties.at("config").begin(); d != _properties.at("config").end(); ++d) + { + if (d->name == "IceBox.UseSharedCommunicator." + service) + { + useSharedCommunicator = (atoi(d->value.c_str()) > 0); + } + } + if (useSharedCommunicator) + { + facet = "IceBox.SharedCommunicator.Properties"; + } + else + { + facet = "IceBox.Service." + service + ".Properties"; + } if(_traceLevels->server > 1) { const string id = _server->getId(); diff --git a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp index 3cf1fec3d9a..3a6c21bafbc 100644 --- a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp @@ -558,6 +558,9 @@ allTests(const Ice::CommunicatorPtr& communicator) service->name = "Service2"; icebox->services[1].descriptor = ServiceDescriptorPtr::dynamicCast(service->ice_clone()); service->name = "Service3"; + // Test also with shared communicator because it uses different proxy name + // and thus different branches in code. + addProperty(icebox, "IceBox.UseSharedCommunicator.Service3", "1"); icebox->services[2].descriptor = ServiceDescriptorPtr::dynamicCast(service->ice_clone()); try |