summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/PlatformInfo.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-12-18 17:06:44 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-12-18 17:06:44 +0000
commitd07fdae285690f699a70f97f36232e516dcad2bc (patch)
treec239def689c5e6cc53ac76dbe3e60ec11c306964 /cpp/src/IceGrid/PlatformInfo.cpp
parentFixed tryLock() comment (diff)
downloadice-d07fdae285690f699a70f97f36232e516dcad2bc.tar.bz2
ice-d07fdae285690f699a70f97f36232e516dcad2bc.tar.xz
ice-d07fdae285690f699a70f97f36232e516dcad2bc.zip
Object adapter properties now prefixed by "Ice.OA."
Diffstat (limited to 'cpp/src/IceGrid/PlatformInfo.cpp')
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp36
1 files changed, 31 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp
index c5fc269efc6..188d5d68910 100644
--- a/cpp/src/IceGrid/PlatformInfo.cpp
+++ b/cpp/src/IceGrid/PlatformInfo.cpp
@@ -175,20 +175,46 @@ PlatformInfo::PlatformInfo(const string& prefix,
_machine = utsinfo.machine;
#endif
+ //
+ // DEPRECATED PROPERTIES: Remove extra code in future release.
+ //
Ice::PropertiesPtr properties = communicator->getProperties();
+ string endpointsPrefix;
+ string oldEndpointsPrefix;
if(prefix == "IceGrid.Registry")
{
_name = properties->getPropertyWithDefault("IceGrid.Registry.ReplicaName", "Master");
- const string endpointsPrefix = prefix + ".Client";
- _endpoints = properties->getPropertyWithDefault(
- endpointsPrefix + ".PublishedEndpoints", properties->getProperty(endpointsPrefix + ".Endpoints"));
+ endpointsPrefix = "Ice.OA." + prefix + ".Client";
+ oldEndpointsPrefix = prefix + ".Client";
}
else
{
_name = properties->getProperty(prefix + ".Name");
- _endpoints = properties->getPropertyWithDefault(
- prefix + ".PublishedEndpoints", properties->getProperty(prefix + ".Endpoints"));
+ endpointsPrefix = prefix;
+ oldEndpointsPrefix = prefix;
+ }
+
+ Ice::PropertyDict props = properties->getPropertiesForPrefix(endpointsPrefix);
+ Ice::PropertyDict::const_iterator p = props.find(endpointsPrefix + ".PublishedEndpoints");
+ if(p != props.end())
+ {
+ _endpoints = p->second;
}
+ else
+ {
+ Ice::PropertyDict oldProps = properties->getPropertiesForPrefix(oldEndpointsPrefix);
+ p = props.find(oldEndpointsPrefix + ".PublishedEndpoints");
+ if(p != props.end())
+ {
+ _endpoints = p->second;
+ }
+ else
+ {
+ _endpoints = properties->getPropertyWithDefault(
+ endpointsPrefix + ".Endpoints", properties->getProperty(oldEndpointsPrefix + ".Endpoints"));
+ }
+ }
+
_dataDir = properties->getProperty(prefix + ".Data");
if(!IcePatch2::isAbsolute(_dataDir))
{