summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-07-30 16:09:17 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-07-30 16:09:17 +0000
commite942347d6a59581a9c5cf8ca5b4421517fcd71c4 (patch)
tree528975ad776600ff013431292fdf603a1d8b936d /cpp/src
parentRemoved IceBox.ServiceManager property (diff)
downloadice-e942347d6a59581a9c5cf8ca5b4421517fcd71c4.tar.bz2
ice-e942347d6a59581a9c5cf8ca5b4421517fcd71c4.tar.xz
ice-e942347d6a59581a9c5cf8ca5b4421517fcd71c4.zip
Removed IceBox.ServiceManager property.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceBox/Admin.cpp34
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp6
2 files changed, 32 insertions, 8 deletions
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp
index ba7420c9511..07d05a0899c 100644
--- a/cpp/src/IceBox/Admin.cpp
+++ b/cpp/src/IceBox/Admin.cpp
@@ -88,22 +88,40 @@ Client::run(int argc, char* argv[])
return EXIT_SUCCESS;
}
- const char* managerProperty = "IceBox.ServiceManager";
- string managerProxy = properties->getProperty(managerProperty);
- if(managerProxy.empty())
+
+ //
+ // 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())
{
- const char* nameProperty = "IceBox.Name";
- string name = properties->getProperty(nameProperty);
- if(!properties->getProperty("Ice.Default.Locator").empty() && !name.empty())
+ namePrefix += ".";
+ }
+
+ string managerProxy;
+
+ string managerEndpoints = properties->getProperty("IceBox.ServiceManager.Endpoints");
+ if(managerEndpoints.empty())
+ {
+ if(!properties->getProperty("Ice.Default.Locator").empty() && !namePrefix.empty())
{
- managerProxy = name + ".ServiceManager@" + name + ".ServiceManagerAdapter";
+ managerProxy = namePrefix + "ServiceManager@" + namePrefix + "ServiceManagerAdapter";
}
else
{
- cerr << appName() << ": property `" << managerProperty << "' is not set" << endl;
+ cerr << appName() << ": property `IceBox.ServiceManager.Endpoints' is not set" << endl;
return EXIT_FAILURE;
}
}
+ else
+ {
+ string managerIdentity = properties->getPropertyWithDefault("IceBox.ServiceManager.Identity",
+ "ServiceManager");
+ managerProxy = namePrefix + managerIdentity + ":" + managerEndpoints;
+ }
ObjectPrx base = communicator()->stringToProxy(managerProxy);
IceBox::ServiceManagerPrx manager = IceBox::ServiceManagerPrx::checkedCast(base);
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 12c67a7d124..b39622d032a 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -57,6 +57,12 @@ IceBox::ServiceManagerI::run()
ServiceManagerPtr obj = this;
//
+ // TODO: Simplify configuration, this is way too complicated. We
+ // should most likely have only two configuration properties, one
+ // for the identity and the other one for the endpoints.
+ //
+
+ //
// Prefix the adapter name and object identity with the value
// of the IceBox.Name property.
//