diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ReferenceFactory.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index d84870e0d6f..f84aff329c6 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -593,12 +593,24 @@ IceInternal::ReferenceFactory::createFromProperties(const string& propertyPrefix { ref = ref->changeLocator( LocatorPrx::uncheckedCast(_communicator->propertyToProxy(property))); + if(ref->getType() == Reference::TypeDirect) + { + Warning out(_instance->initializationData().logger); + out << "`" << property << "=" << properties->getProperty(property) + << "': cannot set a locator on a direct reference; setting ignored"; + } } property = propertyPrefix + ".LocatorCacheTimeout"; if(!properties->getProperty(property).empty()) { ref = ref->changeLocatorCacheTimeout(properties->getPropertyAsInt(property)); + if(ref->getType() == Reference::TypeDirect) + { + Warning out(_instance->initializationData().logger); + out << "`" << property << "=" << properties->getProperty(property) + << "': cannot set a locator cache timeout on a direct reference; setting ignored"; + } } property = propertyPrefix + ".Router"; |