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/IceBox/Admin.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/IceBox/Admin.cpp')
-rw-r--r-- | cpp/src/IceBox/Admin.cpp | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index 07d05a0899c..6246fcff773 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -88,39 +88,31 @@ Client::run(int argc, char* argv[]) return EXIT_SUCCESS; } - - // - // TODO: Simplify configuration, this is way too complicated. We - // should most likely have only two configuration variables, one - // for the identity and the other one for the endpoints. - // - - string namePrefix = properties->getProperty("IceBox.Name"); - if(!namePrefix.empty()) - { - namePrefix += "."; - } - string managerProxy; - string managerEndpoints = properties->getProperty("IceBox.ServiceManager.Endpoints"); - if(managerEndpoints.empty()) + string managerIdentity = properties->getPropertyWithDefault("IceBox.ServiceManager.Identity", "ServiceManager"); + + if(properties->getProperty("Ice.Default.Locator").empty()) { - if(!properties->getProperty("Ice.Default.Locator").empty() && !namePrefix.empty()) - { - managerProxy = namePrefix + "ServiceManager@" + namePrefix + "ServiceManagerAdapter"; - } - else + string managerEndpoints = properties->getProperty("IceBox.ServiceManager.Endpoints"); + if(managerEndpoints.empty()) { cerr << appName() << ": property `IceBox.ServiceManager.Endpoints' is not set" << endl; return EXIT_FAILURE; } + + managerProxy = managerIdentity + ":" + managerEndpoints; } else { - string managerIdentity = properties->getPropertyWithDefault("IceBox.ServiceManager.Identity", - "ServiceManager"); - managerProxy = namePrefix + managerIdentity + ":" + managerEndpoints; + string managerAdapterId = properties->getProperty("IceBox.ServiceManager.AdapterId"); + if(managerAdapterId.empty()) + { + cerr << appName() << ": property `IceBox.ServiceManager.AdapterId' is not set" << endl; + return EXIT_FAILURE; + } + + managerProxy = managerIdentity + "@" + managerAdapterId; } ObjectPrx base = communicator()->stringToProxy(managerProxy); |