summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.cpp')
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index fefd0ed7ebe..90a1428c078 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -61,11 +61,13 @@ namespace IceGrid
}
ServerCache::ServerCache(const Ice::CommunicatorPtr& communicator,
+ const string& instanceName,
NodeCache& nodeCache,
AdapterCache& adapterCache,
ObjectCache& objectCache,
AllocatableObjectCache& allocatableObjectCache) :
_communicator(communicator),
+ _instanceName(instanceName),
_nodeCache(nodeCache),
_adapterCache(adapterCache),
_objectCache(objectCache),
@@ -409,6 +411,26 @@ ServerEntry::getProxy(int& activationTimeout, int& deactivationTimeout, string&
}
}
+Ice::ObjectPrx
+ServerEntry::getAdminProxy()
+{
+ //
+ // The category must match the server admin category used by nodes
+ //
+ Ice::Identity adminId = {_id, _cache.getInstanceName() + "-NodeRouter" };
+
+ // TODO: what's this upToDate parameter about??
+
+ try
+ {
+ return getProxy(true)->ice_identity(adminId);
+ }
+ catch(const ServerNotExistException&)
+ {
+ return 0;
+ }
+}
+
AdapterPrx
ServerEntry::getAdapter(const string& id, bool upToDate)
{