summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerAdapterI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-11-03 20:38:26 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-11-03 20:38:26 +0000
commit871f4f1a52176c8e0a5b57d946b9d5392b7f3c53 (patch)
tree86ab7639887b9b0f663f8ccc7033235c74f23088 /cpp/src/IceGrid/ServerAdapterI.cpp
parentminor changes, reordering IceGrid properties, adding (diff)
downloadice-871f4f1a52176c8e0a5b57d946b9d5392b7f3c53.tar.bz2
ice-871f4f1a52176c8e0a5b57d946b9d5392b7f3c53.tar.xz
ice-871f4f1a52176c8e0a5b57d946b9d5392b7f3c53.zip
Many IceGrid bug fixes.
Diffstat (limited to 'cpp/src/IceGrid/ServerAdapterI.cpp')
-rw-r--r--cpp/src/IceGrid/ServerAdapterI.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/cpp/src/IceGrid/ServerAdapterI.cpp b/cpp/src/IceGrid/ServerAdapterI.cpp
index ad1593944a7..1bf8ab729c3 100644
--- a/cpp/src/IceGrid/ServerAdapterI.cpp
+++ b/cpp/src/IceGrid/ServerAdapterI.cpp
@@ -69,10 +69,11 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur
//
try
{
- if(_server->startInternal(ServerI::OnDemand))
- {
- return;
- }
+ _server->start_async(0);
+ return;
+ }
+ catch(const ServerStartException&)
+ {
}
catch(const Ice::ObjectNotExistException&)
{
@@ -81,10 +82,10 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur
// inconsistent if this happens. The best thing to do is to destroy the adapter and throw
// an ObjectNotExist exception.
//
- destroy(current);
+ destroy();
}
- activationFailed(_server->getState() == IceGrid::Activating);
+ activationFailed(_server->getState() != IceGrid::Activating);
}
Ice::ObjectPrx
@@ -167,14 +168,17 @@ ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Current&)
{
Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->adapterCat);
out << "server `" + _serverId + "' adapter `" << _id << "' " << (_proxy ? "activated" : "deactivated");
+ if(_proxy)
+ {
+ out << ": " << _node->getCommunicator()->proxyToString(_proxy);
+ }
}
}
void
-ServerAdapterI::destroy(const Ice::Current& current)
+ServerAdapterI::destroy()
{
- assert(current.adapter);
- current.adapter->remove(_this->ice_getIdentity());
+ _node->getAdapter()->remove(_this->ice_getIdentity());
}
void
@@ -185,7 +189,7 @@ ServerAdapterI::clear()
}
void
-ServerAdapterI::activationFailed(bool timeout)
+ServerAdapterI::activationFailed(bool destroyed)
{
//
@@ -194,7 +198,7 @@ ServerAdapterI::activationFailed(bool timeout)
if(_node->getTraceLevels()->adapter > 1)
{
Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->adapterCat);
- if(timeout)
+ if(!destroyed)
{
out << "server `" + _serverId + "' adapter `" << _id << "' activation timed out";
}