summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/NodeCache.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-09-20 15:55:05 -0400
committerBernard Normier <bernard@zeroc.com>2007-09-20 15:55:05 -0400
commitf185946cfbced2bf5e6bf8deb0993a18057664d5 (patch)
tree8a2de32151d5dc71bd0353feefa21de018e85f2f /cpp/src/IceGrid/NodeCache.cpp
parentfix for compilation errors with Python 2.5 (diff)
downloadice-f185946cfbced2bf5e6bf8deb0993a18057664d5.tar.bz2
ice-f185946cfbced2bf5e6bf8deb0993a18057664d5.tar.xz
ice-f185946cfbced2bf5e6bf8deb0993a18057664d5.zip
Squashed commit of the following:
commit 2eba3087584d54d3ba98ef50724710fd34d84e0b Author: Bernard Normier <bernard@zeroc.com> Date: Thu Sep 20 15:53:49 2007 -0400 New ice-version attribute, IceGrid now generates Ice.Admin.* properties
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r--cpp/src/IceGrid/NodeCache.cpp51
1 files changed, 44 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp
index c222c680cad..f88258488fc 100644
--- a/cpp/src/IceGrid/NodeCache.cpp
+++ b/cpp/src/IceGrid/NodeCache.cpp
@@ -824,6 +824,9 @@ NodeEntry::finishedRegistration(const Ice::Exception& ex)
InternalServerDescriptorPtr
NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
{
+ //
+ // Note that at this point all variables in info have been resolved
+ //
assert(_session);
InternalServerDescriptorPtr server = new InternalServerDescriptor();
@@ -846,7 +849,7 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
}
server->options = info.descriptor->options;
server->envs = info.descriptor->envs;
- server->processRegistered = false; // Assigned for each communicator (see below)
+
// server->logs: assigned for each communicator (see below)
// server->adapters: assigned for each communicator (see below)
// server->dbEnvs: assigned for each communicator (see below)
@@ -857,7 +860,30 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
//
PropertyDescriptorSeq& props = server->properties["config"];
props.push_back(createProperty("# Server configuration"));
- props.push_back(createProperty("Ice.ServerId", info.descriptor->id));
+
+ //
+ // For newer versions of Ice, we generate Ice.Admin properties:
+ //
+ int iceVersion = 0;
+ if(info.descriptor->iceVersion != "")
+ {
+ iceVersion = getMMVersion(info.descriptor->iceVersion);
+ }
+
+ if(iceVersion == 0 || iceVersion >= 30300)
+ {
+ props.push_back(createProperty("Ice.Admin.ServerId", info.descriptor->id));
+
+ server->processRegistered =
+ getProperty(info.descriptor->propertySet.properties, "Ice.Admin.Endpoints") != "";
+ }
+ else
+ {
+ props.push_back(createProperty("Ice.ServerId", info.descriptor->id));
+ server->processRegistered = false; // Assigned for each communicator (see below)
+ }
+
+ // props.push_back(createProperty("Ice.ServerId", info.descriptor->id));
props.push_back(createProperty("Ice.ProgramName", info.descriptor->id));
//
@@ -877,11 +903,22 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
}
props.push_back(createProperty("IceBox.LoadOrder", servicesStr));
- if(iceBox->adapters.empty() &&
- getProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess") != "0")
- {
- server->processRegistered = true;
- }
+
+ if(iceVersion != 0 && iceVersion < 30300)
+ {
+ if(isSet(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess"))
+ {
+ if(getProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess") != "0")
+ {
+ server->processRegistered = true;
+ }
+ }
+ else
+ {
+ props.push_back(createProperty("IceBox.ServiceManager.RegisterProcess", "1"));
+ server->processRegistered = true;
+ }
+ }
}
//