summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-05-29 16:14:34 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-05-29 16:14:34 +0000
commit61bd0677a5696512209a662930dd233eca31d29e (patch)
tree69acd8bc13389a6397e5b9f321dd8d5126faf9fc /cpp/src
parentFixes (diff)
downloadice-61bd0677a5696512209a662930dd233eca31d29e.tar.bz2
ice-61bd0677a5696512209a662930dd233eca31d29e.tar.xz
ice-61bd0677a5696512209a662930dd233eca31d29e.zip
The default value for the adaper endpoints in the XML descriptors in now
"default"
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/DescriptorHelper.cpp11
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp2
-rw-r--r--cpp/src/IceGrid/Util.cpp5
-rw-r--r--cpp/src/IceGrid/Util.h2
4 files changed, 14 insertions, 6 deletions
diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp
index 090a9980063..c5dc02b73cc 100644
--- a/cpp/src/IceGrid/DescriptorHelper.cpp
+++ b/cpp/src/IceGrid/DescriptorHelper.cpp
@@ -906,6 +906,15 @@ CommunicatorHelper::instantiateImpl(const CommunicatorDescriptorPtr& instance, c
}
adapter.objects = resolve(p->objects);
instance->adapters.push_back(adapter);
+
+ //
+ // Make sure the endpoints are defined.
+ //
+ string endpoints = IceGrid::getProperty(instance->propertySet.properties, adapter.name + ".Endpoints");
+ if(endpoints.empty())
+ {
+ resolve.exception("invalid endpoints for adapter `" + adapter.name + "': empty string");
+ }
}
for(DbEnvDescriptorSeq::const_iterator s = _desc->dbEnvs.begin(); s != _desc->dbEnvs.end(); ++s)
@@ -1037,7 +1046,7 @@ CommunicatorHelper::printPropertySet(Output& out, const PropertySetDescriptor& p
string
CommunicatorHelper::getProperty(const string& name) const
{
- return IceGrid::getProperty(_desc->propertySet, name);
+ return IceGrid::getProperty(_desc->propertySet.properties, name);
}
ServiceHelper::ServiceHelper(const Ice::CommunicatorPtr& communicator, const ServiceDescriptorPtr& descriptor) :
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index 8e38f837418..6eec5db224e 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -170,7 +170,7 @@ ServerCache::addCommunicator(const CommunicatorDescriptorPtr& comm, const Server
info.type = r->type;
if(q->id.empty())
{
- const string edpts = IceGrid::getProperty(comm->propertySet, q->name + ".Endpoints");
+ const string edpts = IceGrid::getProperty(comm->propertySet.properties, q->name + ".Endpoints");
info.proxy = _communicator->stringToProxy(_communicator->identityToString(r->id) + ":" + edpts);
}
else
diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp
index 00d04bd3bf7..cedc6ca1b95 100644
--- a/cpp/src/IceGrid/Util.cpp
+++ b/cpp/src/IceGrid/Util.cpp
@@ -61,10 +61,9 @@ IceGrid::toString(const Ice::Exception& exception)
}
string
-IceGrid::getProperty(const PropertySetDescriptor& propertySet, const string& name, const string& def)
+IceGrid::getProperty(const PropertyDescriptorSeq& properties, const string& name, const string& def)
{
- for(PropertyDescriptorSeq::const_iterator q = propertySet.properties.begin();
- q != propertySet.properties.end(); ++q)
+ for(PropertyDescriptorSeq::const_iterator q = properties.begin(); q != properties.end(); ++q)
{
if(q->name == name)
{
diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h
index 84a517a92f8..d2196853427 100644
--- a/cpp/src/IceGrid/Util.h
+++ b/cpp/src/IceGrid/Util.h
@@ -26,7 +26,7 @@ inline set_inserter(T& container)
std::string toString(const std::vector<std::string>&, const std::string& = std::string(" "));
std::string toString(const Ice::Exception&);
-std::string getProperty(const PropertySetDescriptor&, const std::string&, const std::string& = std::string());
+std::string getProperty(const PropertyDescriptorSeq&, const std::string&, const std::string& = std::string());
template<class Function>
struct ForEachCommunicator : std::unary_function<CommunicatorDescriptorPtr&, void>