diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-09-21 14:02:52 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-09-21 14:02:52 +0000 |
commit | fed698d7a15486e1c01ee4e7eafe3da45d7cd803 (patch) | |
tree | 5013a1127805e438bc76dc8f4b2f49a1c2461fea /cpp/src/IceGrid/ServerI.cpp | |
parent | Fix (diff) | |
download | ice-fed698d7a15486e1c01ee4e7eafe3da45d7cd803.tar.bz2 ice-fed698d7a15486e1c01ee4e7eafe3da45d7cd803.tar.xz ice-fed698d7a15486e1c01ee4e7eafe3da45d7cd803.zip |
Improved the error message if you try to remove an object or adapter with
the admin interface and if that object or adapter was added with a
deployment descriptor.
Fixed a bug where trying to start a server managed by a node would fail if
this server was previously manually activated.
Simplified adapter direct proxy update if the adapter is an adapter that
wasn't added with a deployment descriptor.
Fixes to allow compilation on AIX.
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 659bf108373..851b2ef02e0 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -417,7 +417,7 @@ ServerI::terminated(const Ice::Current& current) { try { - p->second->setDirectProxy(0, current); + p->second->setDirectProxy(0); } catch(const Ice::ObjectNotExistException&) { @@ -474,6 +474,7 @@ bool ServerI::startInternal(ServerActivation act, const AMD_Server_startPtr& amdCB) { ServerDescriptorPtr desc; + map<string, ServerAdapterIPtr> adpts; while(true) { Lock sync(*this); @@ -528,6 +529,7 @@ ServerI::startInternal(ServerActivation act, const AMD_Server_startPtr& amdCB) assert(_state == ServerI::Activating); desc = _desc; + adpts = _adapters; if(amdCB) { _startCB.push_back(amdCB); @@ -551,6 +553,21 @@ ServerI::startInternal(ServerActivation act, const AMD_Server_startPtr& amdCB) pwd = _serverDir + "/data"; } + // + // Clear the adapters direct proxy (this is usefull if the server + // was manually activated). + // + for(map<string, ServerAdapterIPtr>::iterator p = adpts.begin(); p != adpts.end(); ++p) + { + try + { + p->second->setDirectProxy(0); + } + catch(const Ice::ObjectNotExistException&) + { + } + } + try { bool started = _node->getActivator()->activate(desc->id, desc->exe, pwd, options, envs, _this); |