diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-10-06 15:15:02 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-10-06 15:15:02 +0000 |
commit | 0520bfc67149d75fbf2dffbeac27c43164f16e14 (patch) | |
tree | 962c18a611b2c530984ab89dc882061e0a335c20 /cpp/src/IceGrid/IceGridNode.cpp | |
parent | IceGrid.ObjectNotExist -> IceGrid.ObjectNotregistered (diff) | |
download | ice-0520bfc67149d75fbf2dffbeac27c43164f16e14.tar.bz2 ice-0520bfc67149d75fbf2dffbeac27c43164f16e14.tar.xz ice-0520bfc67149d75fbf2dffbeac27c43164f16e14.zip |
Added support for default templates.
Added support for default parameters.
Added support for findObjectByTypeOnLeastLoadedNode
Added default templates descriptor (config/templates.xml)
Diffstat (limited to 'cpp/src/IceGrid/IceGridNode.cpp')
-rw-r--r-- | cpp/src/IceGrid/IceGridNode.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 3edce7b2c0b..d514d90c964 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -237,7 +237,7 @@ NodeService::start(int argc, char* argv[]) bool nowarn = false; bool checkdb = false; - string descriptor; + string desc; vector<string> targets; for(int i = 1; i < argc; ++i) { @@ -264,7 +264,7 @@ NodeService::start(int argc, char* argv[]) return false; } - descriptor = argv[++i]; + desc = argv[++i]; while(i + 1 < argc && argv[++i][0] != '-') { @@ -483,18 +483,19 @@ NodeService::start(int argc, char* argv[]) // // Deploy application if a descriptor is passed as a command-line option. // - if(!descriptor.empty()) + if(!desc.empty()) { AdminPrx admin; try { - admin = AdminPrx::checkedCast(communicator()->stringToProxy("IceGrid/Admin")); + const string adminIdProperty = "IceGrid.Registry.AdminIdentity"; + string adminId = properties->getPropertyWithDefault(adminIdProperty, "IceGrid/Admin"); + admin = AdminPrx::checkedCast(communicator()->stringToProxy(adminId)); } catch(const LocalException& ex) { ostringstream ostr; - ostr << "couldn't contact IceGrid admin interface to deploy application `" << descriptor << "':" << endl - << ex; + ostr << "couldn't contact IceGrid admin interface to deploy application `" << desc << "':\n" << ex; warning(ostr.str()); } @@ -503,18 +504,18 @@ NodeService::start(int argc, char* argv[]) try { map<string, string> vars; - admin->addApplication(DescriptorParser::parseDescriptor(descriptor, targets, vars, communicator())); + admin->addApplication(DescriptorParser::parseDescriptor(desc, targets, vars, communicator(), admin)); } catch(const DeploymentException& ex) { ostringstream ostr; - ostr << "failed to deploy application `" << descriptor << "':" << endl << ex << ": " << ex.reason; + ostr << "failed to deploy application `" << desc << "':\n" << ex << ": " << ex.reason; warning(ostr.str()); } catch(const LocalException& ex) { ostringstream ostr; - ostr << "failed to deploy application `" << descriptor << "':" << endl << ex; + ostr << "failed to deploy application `" << desc << "':\n" << ex; warning(ostr.str()); } } |