summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-09-27 11:37:26 -0400
committerBernard Normier <bernard@zeroc.com>2007-09-27 11:37:26 -0400
commit29aad94424e506d30ba89c18e3ce3d5fecc03dcc (patch)
tree9acda23df0d372428fe500ff55a02d07db382792 /cpp/src
parentSquashed commit of the following: (diff)
downloadice-29aad94424e506d30ba89c18e3ce3d5fecc03dcc.tar.bz2
ice-29aad94424e506d30ba89c18e3ce3d5fecc03dcc.tar.xz
ice-29aad94424e506d30ba89c18e3ce3d5fecc03dcc.zip
iceboxadmin is now using IceBoxAdmin.ServiceManager.Proxy
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/PropertyNames.cpp22
-rw-r--r--cpp/src/Ice/PropertyNames.h3
-rw-r--r--cpp/src/IceBox/Admin.cpp56
3 files changed, 57 insertions, 24 deletions
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp
index f514fb6a11a..f4af02db377 100644
--- a/cpp/src/Ice/PropertyNames.cpp
+++ b/cpp/src/Ice/PropertyNames.cpp
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Sep 26 17:22:42 2007
+// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Sep 26 19:26:30 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -150,6 +150,24 @@ const IceInternal::PropertyArray
IceInternal::PropertyNames::IceBoxProps(IceBoxPropsData,
sizeof(IceBoxPropsData)/sizeof(IceBoxPropsData[0]));
+const IceInternal::Property IceBoxAdminPropsData[] =
+{
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.EndpointSelection", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.ConnectionCached", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.PreferSecure", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.LocatorCacheTimeout", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.Locator", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.Router", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.CollocationOptimization", true, "IceBoxAdmin.ServiceManager.Proxy.CollocationOptimized"),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.CollocationOptimized", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.ThreadPerConnection", false, 0),
+ IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy", false, 0),
+};
+
+const IceInternal::PropertyArray
+ IceInternal::PropertyNames::IceBoxAdminProps(IceBoxAdminPropsData,
+ sizeof(IceBoxAdminPropsData)/sizeof(IceBoxAdminPropsData[0]));
+
const IceInternal::Property IceGridAdminPropsData[] =
{
IceInternal::Property("IceGridAdmin.AuthenticateUsingSSL", false, 0),
@@ -618,6 +636,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] =
{
IceProps,
IceBoxProps,
+ IceBoxAdminProps,
IceGridAdminProps,
IceGridProps,
IcePatch2Props,
@@ -634,6 +653,7 @@ const char* IceInternal::PropertyNames::clPropNames[] =
{
"Ice",
"IceBox",
+ "IceBoxAdmin",
"IceGridAdmin",
"IceGrid",
"IcePatch2",
diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h
index c9b88bf3f2a..e38d1d94eed 100644
--- a/cpp/src/Ice/PropertyNames.h
+++ b/cpp/src/Ice/PropertyNames.h
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Sep 26 17:22:42 2007
+// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Sep 26 19:26:30 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -59,6 +59,7 @@ public:
static const PropertyArray IceProps;
static const PropertyArray IceBoxProps;
+ static const PropertyArray IceBoxAdminProps;
static const PropertyArray IceGridAdminProps;
static const PropertyArray IceGridProps;
static const PropertyArray IcePatch2Props;
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp
index fce10f5681d..e2f02d6a728 100644
--- a/cpp/src/IceBox/Admin.cpp
+++ b/cpp/src/IceBox/Admin.cpp
@@ -84,40 +84,52 @@ Client::run(int argc, char* argv[])
return EXIT_FAILURE;
}
- PropertiesPtr properties = communicator()->getProperties();
- Identity managerIdentity;
- managerIdentity.category = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox");
- managerIdentity.name = "ServiceManager";
+
+ ObjectPrx base = communicator()->propertyToProxy("IceBoxAdmin.ServiceManager.Proxy");
- string managerProxy;
- if(properties->getProperty("Ice.Default.Locator").empty())
+ if(base == 0)
{
- string managerEndpoints = properties->getProperty("IceBox.ServiceManager.Endpoints");
- if(managerEndpoints.empty())
+ //
+ // The old deprecated way to retrieve the service manager proxy
+ //
+
+ PropertiesPtr properties = communicator()->getProperties();
+
+ Identity managerIdentity;
+ managerIdentity.category = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox");
+ managerIdentity.name = "ServiceManager";
+
+ string managerProxy;
+ if(properties->getProperty("Ice.Default.Locator").empty())
{
- cerr << appName() << ": property `IceBox.ServiceManager.Endpoints' is not set" << endl;
- return EXIT_FAILURE;
+ string managerEndpoints = properties->getProperty("IceBox.ServiceManager.Endpoints");
+ if(managerEndpoints.empty())
+ {
+ cerr << appName() << ": property `IceBoxAdmin.ServiceManager.Proxy' is not set" << endl;
+ return EXIT_FAILURE;
+ }
+
+ managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" :" + managerEndpoints;
}
-
- managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" :" + managerEndpoints;
- }
- else
- {
- string managerAdapterId = properties->getProperty("IceBox.ServiceManager.AdapterId");
- if(managerAdapterId.empty())
+ else
{
- cerr << appName() << ": property `IceBox.ServiceManager.AdapterId' is not set" << endl;
- return EXIT_FAILURE;
+ string managerAdapterId = properties->getProperty("IceBox.ServiceManager.AdapterId");
+ if(managerAdapterId.empty())
+ {
+ cerr << appName() << ": property `IceBoxAdmin.ServiceManager.Proxy' is not set" << endl;
+ return EXIT_FAILURE;
+ }
+
+ managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" @" + managerAdapterId;
}
- managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" @" + managerAdapterId;
+ base = communicator()->stringToProxy(managerProxy);
}
- ObjectPrx base = communicator()->stringToProxy(managerProxy);
IceBox::ServiceManagerPrx manager = IceBox::ServiceManagerPrx::checkedCast(base);
if(!manager)
{
- cerr << appName() << ": `" << managerProxy << "' is not running" << endl;
+ cerr << appName() << ": `" << base << "' is not an IceBox::ServiceManager" << endl;
return EXIT_FAILURE;
}