From f185946cfbced2bf5e6bf8deb0993a18057664d5 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Thu, 20 Sep 2007 15:55:05 -0400 Subject: Squashed commit of the following: commit 2eba3087584d54d3ba98ef50724710fd34d84e0b Author: Bernard Normier Date: Thu Sep 20 15:53:49 2007 -0400 New ice-version attribute, IceGrid now generates Ice.Admin.* properties --- cpp/src/IceGrid/DescriptorHelper.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'cpp/src/IceGrid/DescriptorHelper.cpp') 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; -- cgit v1.2.3