summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ReferenceFactory.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-06-04 02:15:31 +0000
committerMichi Henning <michi@zeroc.com>2007-06-04 02:15:31 +0000
commit77603bb15d512c7e6c35d2aa8f455816665c96c9 (patch)
tree3ec4f4fb42fcd3b0caa84a4005a22259da96aae4 /cpp/src/Ice/ReferenceFactory.cpp
parentBug 1597. (diff)
downloadice-77603bb15d512c7e6c35d2aa8f455816665c96c9.tar.bz2
ice-77603bb15d512c7e6c35d2aa8f455816665c96c9.tar.xz
ice-77603bb15d512c7e6c35d2aa8f455816665c96c9.zip
Bug 1597.
Diffstat (limited to 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r--cpp/src/Ice/ReferenceFactory.cpp12
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";