diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-09-11 20:33:06 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-09-11 20:33:06 +0000 |
commit | af019e080ac9319035abe899838bc6ff7bf7e435 (patch) | |
tree | 754643a46a0f0ef381b0a7596fc08a17dcda5cdf /cpp/src/IcePack/ServiceBuilder.cpp | |
parent | Fix bug in changeTimeout (the newEndpoints were not passed to the (diff) | |
download | ice-af019e080ac9319035abe899838bc6ff7bf7e435.tar.bz2 ice-af019e080ac9319035abe899838bc6ff7bf7e435.tar.xz ice-af019e080ac9319035abe899838bc6ff7bf7e435.zip |
Object adapter creation method changes, IceBox changes.
Diffstat (limited to 'cpp/src/IcePack/ServiceBuilder.cpp')
-rw-r--r-- | cpp/src/IcePack/ServiceBuilder.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/cpp/src/IcePack/ServiceBuilder.cpp b/cpp/src/IcePack/ServiceBuilder.cpp index 3c7ba67497e..37adeaed70a 100644 --- a/cpp/src/IcePack/ServiceBuilder.cpp +++ b/cpp/src/IcePack/ServiceBuilder.cpp @@ -70,13 +70,24 @@ IcePack::ServiceHandler::startElement(const XMLCh *const name, AttributeList &at _builder.setDBEnv(getAttributeValueWithDefault(attrs, "dbenv", "")); } - _builder.createConfigFile("/config/config_" + _builder.substitute("${name}")); + _builder.createConfigFile(_builder.substitute("/config/config_${name}")); _builder.setEntryPoint(getAttributeValue(attrs, "entry")); } else if(str == "adapter") { - _builder.getServerBuilder().registerAdapter(getAttributeValue(attrs, "name"), - getAttributeValueWithDefault(attrs, "endpoints", "")); + string name = getAttributeValue(attrs, "name"); + string id = getAttributeValueWithDefault(attrs, "id", ""); + + // + // If the adapter id is not specified or empty, generate one + // from the server, service and adapter name: <adapter + // name>-<server name>-<service name> + // + if(id.empty()) + { + id = name + "-" + _builder.getServerBuilder().substitute("${name}") + _builder.substitute("${name}"); + } + _builder.getServerBuilder().registerAdapter(name, getAttributeValue(attrs, "endpoints"), id); } } |