diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-04-15 09:41:21 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-04-15 09:41:21 +0200 |
commit | 54884a0b4c139118fc49498b6d6715d7d9ab718c (patch) | |
tree | 1f00091ad68543b3dc9828f27e32c0d9f7d072fe /cpp/src/Ice/ReferenceFactory.cpp | |
parent | VC11 fixes for PHP 5.5 (diff) | |
download | ice-54884a0b4c139118fc49498b6d6715d7d9ab718c.tar.bz2 ice-54884a0b4c139118fc49498b6d6715d7d9ab718c.tar.xz ice-54884a0b4c139118fc49498b6d6715d7d9ab718c.zip |
Added support for IceGrid custom load balancing
Diffstat (limited to 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ReferenceFactory.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 58fad776323..d63bfc3a4e6 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -716,7 +716,8 @@ IceInternal::ReferenceFactory::checkForUnknownProperties(const string& prefix) "LocatorCacheTimeout", "Locator", "Router", - "CollocationOptimized" + "CollocationOptimized", + "Context.*" }; // @@ -738,7 +739,7 @@ IceInternal::ReferenceFactory::checkForUnknownProperties(const string& prefix) for(unsigned int i = 0; i < sizeof(suffixes)/sizeof(*suffixes); ++i) { string prop = prefix + "." + suffixes[i]; - if(p->first == prop) + if(IceUtilInternal::match(p->first, prop)) { valid = true; break; @@ -796,6 +797,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, bool preferSecure = defaultsAndOverrides->defaultPreferSecure; Ice::EndpointSelectionType endpointSelection = defaultsAndOverrides->defaultEndpointSelection; int locatorCacheTimeout = defaultsAndOverrides->defaultLocatorCacheTimeout; + Ice::Context ctx; // // Override the defaults with the proxy properties if a property prefix is defined. @@ -871,6 +873,13 @@ IceInternal::ReferenceFactory::create(const Identity& ident, property = propertyPrefix + ".LocatorCacheTimeout"; locatorCacheTimeout = properties->getPropertyAsIntWithDefault(property, locatorCacheTimeout); + + property = propertyPrefix + ".Context."; + PropertyDict contexts = properties->getPropertiesForPrefix(property); + for(PropertyDict::const_iterator p = contexts.begin(); p != contexts.end(); ++p) + { + ctx.insert(make_pair(p->first.substr(property.length()), p->second)); + } } // @@ -892,6 +901,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, cacheConnection, preferSecure, endpointSelection, - locatorCacheTimeout); + locatorCacheTimeout, + ctx); } |