summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/DescriptorHelper.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/DescriptorHelper.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/DescriptorHelper.cpp')
-rw-r--r--cpp/src/IceGrid/DescriptorHelper.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp
index 1368294a5c5..36be70c44c9 100644
--- a/cpp/src/IceGrid/DescriptorHelper.cpp
+++ b/cpp/src/IceGrid/DescriptorHelper.cpp
@@ -1291,6 +1291,11 @@ ServerHelper::operator==(const CommunicatorHelper& h) const
return false;
}
+ if(_desc->iceVersion != helper->_desc->iceVersion)
+ {
+ return false;
+ }
+
if(_desc->pwd != helper->_desc->pwd)
{
return false;
@@ -1401,6 +1406,12 @@ ServerHelper::printImpl(const Ice::CommunicatorPtr& communicator, Output& out, c
out << nl << "session id = `" << info.sessionId << "'";
}
out << nl << "exe = `" << _desc->exe << "'";
+
+ if(!_desc->iceVersion.empty())
+ {
+ out << nl << "ice version = `" << _desc->iceVersion << "'";
+ }
+
if(!_desc->pwd.empty())
{
out << nl << "pwd = `" << _desc->pwd << "'";
@@ -1453,6 +1464,28 @@ ServerHelper::instantiateImpl(const ServerDescriptorPtr& instance,
instance->id = resolve.asId(_desc->id, "id", false);
instance->exe = resolve(_desc->exe, "executable", false);
+
+ instance->iceVersion = resolve(_desc->iceVersion, "ice version");
+ if(!instance->iceVersion.empty())
+ {
+ int version = getMMVersion(instance->iceVersion);
+ if(version < 0)
+ {
+ resolve.exception("invalid ice version: " + instance->iceVersion);
+ }
+ else if(version > ICE_INT_VERSION)
+ {
+ //resolve.exception("invalid ice version: " + instance->iceVersion + " is superior to the IceGrid \n"
+ //"registry version (" + ICE_STRING_VERSION + ")");
+ if(resolve.warningEnabled())
+ {
+ Ice::Warning out(resolve.getCommunicator()->getLogger());
+ out << "invalid ice version: " << instance->iceVersion << " is superior to the IceGrid ";
+ out << "registry version (" << ICE_STRING_VERSION << ")";
+ }
+ }
+ }
+
instance->pwd = resolve(_desc->pwd, "working directory path");
instance->activation = resolve(_desc->activation, "activation");
instance->applicationDistrib = _desc->applicationDistrib;