diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-09-20 15:55:05 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-09-20 15:55:05 -0400 |
commit | f185946cfbced2bf5e6bf8deb0993a18057664d5 (patch) | |
tree | 8a2de32151d5dc71bd0353feefa21de018e85f2f /cpp/src/IceGrid/DescriptorHelper.cpp | |
parent | fix for compilation errors with Python 2.5 (diff) | |
download | ice-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.cpp | 33 |
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; |