summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/DescriptorParser.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-09-13 08:20:38 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-09-13 08:20:38 +0000
commit7f24d81b685383e7cc09e32ad89c830d86372ca0 (patch)
tree8ccefbe74117f62bd42dd8794cc15e3f9674cb36 /cpp/src/IceGrid/DescriptorParser.cpp
parentRemoved bogus abort(); // XXX (diff)
downloadice-7f24d81b685383e7cc09e32ad89c830d86372ca0.tar.bz2
ice-7f24d81b685383e7cc09e32ad89c830d86372ca0.tar.xz
ice-7f24d81b685383e7cc09e32ad89c830d86372ca0.zip
Added support for load factor
Added warning for unknown XML attributes
Diffstat (limited to 'cpp/src/IceGrid/DescriptorParser.cpp')
-rw-r--r--cpp/src/IceGrid/DescriptorParser.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp
index 95adf19b931..c098a96ad2b 100644
--- a/cpp/src/IceGrid/DescriptorParser.cpp
+++ b/cpp/src/IceGrid/DescriptorParser.cpp
@@ -101,7 +101,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
{
_line = line;
_column = column;
- XmlAttributesHelper attributes(attrs);
+ XmlAttributesHelper attributes(attrs, _communicator->getLogger(), _filename, line);
try
{
@@ -136,6 +136,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
// We don't bother to parse the elements if the elements are enclosed in a target element
// which won't be deployed.
//
+ attributes.asMap(); // NOTE: prevents warning about attributes not being used.
return;
}
else if(name == "include")
@@ -267,9 +268,17 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
{
error("the <replicated-adapter> element can only be a child of a <application> element");
}
- _currentApplication->addReplicatedAdapter(attrs);
+ _currentApplication->addReplicatedAdapter(attributes);
_inAdapter = true;
}
+ else if(name == "load-balancing")
+ {
+ if(!_inAdapter || _currentServer.get())
+ {
+ error("the <load-balancing> element can only be a child of a <replicated-adapter> element");
+ }
+ _currentApplication->setLoadBalancing(attributes);
+ }
else if(name == "variable")
{
if(_currentNode.get())
@@ -333,11 +342,11 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
}
if(!_currentServer.get())
{
- _currentApplication->addPatch(attrs);
+ _currentApplication->addPatch(attributes);
}
else
{
- _currentServer->addPatch(attrs);
+ _currentServer->addPatch(attributes);
}
_inPatch = true;
}
@@ -347,7 +356,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
{
error("the <use-patch> element can only be a child of a <server> or <icebox> element");
}
- _currentServer->addUsePatch(attrs);
+ _currentServer->addUsePatch(attributes);
}
else if(name == "dbenv")
{
@@ -355,7 +364,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
{
error("the <dbenv> element can only be a child of an <server> or <service> element");
}
- _currentCommunicator->addDbEnv(attrs);
+ _currentCommunicator->addDbEnv(attributes);
_inDbEnv = true;
}
else if(name == "dbproperty")
@@ -364,7 +373,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at
{
error("the <dbproperty> element can only be a child of a <dbenv> element");
}
- _currentCommunicator->addDbEnvProperty(attrs);
+ _currentCommunicator->addDbEnvProperty(attributes);
}
}
catch(const string& reason)