summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/NodeAdminRouter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/NodeAdminRouter.cpp')
-rw-r--r--cpp/src/IceGrid/NodeAdminRouter.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/NodeAdminRouter.cpp b/cpp/src/IceGrid/NodeAdminRouter.cpp
index d87083d9cf1..5100c8c9880 100644
--- a/cpp/src/IceGrid/NodeAdminRouter.cpp
+++ b/cpp/src/IceGrid/NodeAdminRouter.cpp
@@ -18,12 +18,15 @@ using namespace std;
IceGrid::NodeServerAdminRouter::NodeServerAdminRouter(const NodeIPtr& node) :
+ AdminRouter(node->getTraceLevels()),
_node(node)
{
}
-ObjectPrx
-IceGrid::NodeServerAdminRouter::getTarget(const Current& current)
+void
+IceGrid::NodeServerAdminRouter::ice_invoke_async(const AMD_Object_ice_invokePtr& cb,
+ const std::pair<const Ice::Byte*, const Ice::Byte*>& inParams,
+ const Current& current)
{
//
// First, get the ServerI servant
@@ -32,9 +35,15 @@ IceGrid::NodeServerAdminRouter::getTarget(const Current& current)
ServerIPtr server = ServerIPtr::dynamicCast(_node->getAdapter()->find(serverId));
if(server == 0)
{
+ if(_traceLevels->admin > 0)
+ {
+ Ice::Trace out(_traceLevels->logger, _traceLevels->adminCat);
+ out << "could not find Admin proxy for server `" << current.id.name << "'";
+ }
+
throw ObjectNotExistException(__FILE__, __LINE__);
}
-
+
//
// Then get a proxy to the Process facet of the real admin object
//
@@ -42,9 +51,15 @@ IceGrid::NodeServerAdminRouter::getTarget(const Current& current)
if(target == 0)
{
+ if(_traceLevels->admin > 0)
+ {
+ Ice::Trace out(_traceLevels->logger, _traceLevels->adminCat);
+ out << "no Process proxy registered with server `" << current.id.name << "'";
+ }
+
throw ObjectNotExistException(__FILE__, __LINE__);
}
-
+
//
// If this is a legacy Process proxy with no facet, we keep target as is
//
@@ -56,6 +71,6 @@ IceGrid::NodeServerAdminRouter::getTarget(const Current& current)
target = target->ice_facet(current.facet);
}
- return target;
+ invokeOnTarget(target, cb, inParams, current);
}