summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/PropertyNames.def1
-rw-r--r--cpp/demo/IceBox/hello/config2
-rw-r--r--cpp/src/Ice/PropertyNames.cpp3
-rw-r--r--cpp/src/Ice/PropertyNames.h2
-rw-r--r--cpp/src/IceBox/Admin.cpp6
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp7
6 files changed, 16 insertions, 5 deletions
diff --git a/cpp/config/PropertyNames.def b/cpp/config/PropertyNames.def
index a38292be388..785941ef7df 100644
--- a/cpp/config/PropertyNames.def
+++ b/cpp/config/PropertyNames.def
@@ -164,6 +164,7 @@ Ice:
Warn.Leaks
IceBox:
+ InstanceName
LoadOrder
PrintServicesReady
Service.<any>
diff --git a/cpp/demo/IceBox/hello/config b/cpp/demo/IceBox/hello/config
index bd48e42d1f4..36b2fdbeddf 100644
--- a/cpp/demo/IceBox/hello/config
+++ b/cpp/demo/IceBox/hello/config
@@ -1,3 +1,5 @@
+IceBox.InstanceName=DemoIceBox
+
#
# The IceBox server endpoint configuration
#
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp
index 5c78672ea90..824b9a1ea73 100644
--- a/cpp/src/Ice/PropertyNames.cpp
+++ b/cpp/src/Ice/PropertyNames.cpp
@@ -7,7 +7,7 @@
//
// **********************************************************************
-// Generated by makeprops.py from file `/Users/matthew/zeroc/ice/config/PropertyNames.def', Thu Oct 20 15:43:40 2005
+// Generated by makeprops.py from file `../../../config/PropertyNames.def', Thu Oct 20 08:53:58 2005
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -76,6 +76,7 @@ const char* IceInternal::PropertyNames::IceProps[] =
const char* IceInternal::PropertyNames::IceBoxProps[] =
{
+ "IceBox.InstanceName",
"IceBox.LoadOrder",
"IceBox.PrintServicesReady",
"IceBox.Service.*",
diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h
index 97ffca1c578..410bf35eef4 100644
--- a/cpp/src/Ice/PropertyNames.h
+++ b/cpp/src/Ice/PropertyNames.h
@@ -7,7 +7,7 @@
//
// **********************************************************************
-// Generated by makeprops.py from file `/Users/matthew/zeroc/ice/config/PropertyNames.def', Thu Oct 20 15:43:40 2005
+// Generated by makeprops.py from file `../../../config/PropertyNames.def', Thu Oct 20 08:53:58 2005
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp
index 1219da4098a..ada94012293 100644
--- a/cpp/src/IceBox/Admin.cpp
+++ b/cpp/src/IceBox/Admin.cpp
@@ -83,7 +83,11 @@ Client::run(int argc, char* argv[])
}
PropertiesPtr properties = communicator()->getProperties();
- string managerIdentity = properties->getPropertyWithDefault("IceBox.ServiceManager.Identity", "ServiceManager");
+ string managerIdentity = properties->getProperty("IceBox.ServiceManager.Identity");
+ if(managerIdentity.empty())
+ {
+ managerIdentity = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager";
+ }
string managerProxy;
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 216e4f5abae..f760bd66b97 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -65,8 +65,11 @@ IceBox::ServiceManagerI::run()
ObjectAdapterPtr adapter = _server->communicator()->createObjectAdapter("IceBox.ServiceManager");
PropertiesPtr properties = _server->communicator()->getProperties();
-
- string identity = properties->getPropertyWithDefault("IceBox.ServiceManager.Identity", "ServiceManager");
+ string identity = properties->getProperty("IceBox.ServiceManager.Identity");
+ if(identity.empty())
+ {
+ identity = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager";
+ }
adapter->add(obj, stringToIdentity(identity));
//