From 7bae461be57d06320c1d7860e6967bcd0b14718c Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 3 Dec 2007 15:04:10 +0100 Subject: - Changed AdminI server start/stop methods to use AMI/AMD - Minor exception handling fix in registry server admin router. - Changed Admin::getServerAdmin method to check if the server exists and can be loaded on the node before to return the server admin object. - Fixed icegridadmin to use the process facet to write messages --- cpp/src/IceGrid/ServerCache.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'cpp/src/IceGrid/ServerCache.cpp') diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index d2f87fbc65e..502a8d93672 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -360,6 +360,11 @@ ServerEntry::getId() const ServerPrx ServerEntry::getProxy(bool upToDate) { + // + // NOTE: this might throw ServerNotExistException, NodeUnreachableException + // or DeploymentException. + // + int actTimeout, deactTimeout; string node; return getProxy(actTimeout, deactTimeout, node, upToDate); @@ -368,6 +373,11 @@ ServerEntry::getProxy(bool upToDate) ServerPrx ServerEntry::getProxy(int& activationTimeout, int& deactivationTimeout, string& node, bool upToDate) { + // + // NOTE: this might throw ServerNotExistException, NodeUnreachableException + // or DeploymentException. + // + { Lock sync(*this); if(_loaded.get() || _proxy && _synchronizing && !upToDate) // Synced or if not up to date is fine @@ -420,20 +430,17 @@ ServerEntry::getAdminProxy() Ice::Identity adminId; adminId.name = _id; adminId.category = _cache.getInstanceName() + "-NodeRouter"; - - try - { - return getProxy(true)->ice_identity(adminId); - } - catch(const ServerNotExistException&) - { - return 0; - } + return getProxy(true)->ice_identity(adminId); } AdapterPrx ServerEntry::getAdapter(const string& id, bool upToDate) { + // + // NOTE: this might throw AdapterNotExistException, NodeUnreachableException + // or DeploymentException. + // + int activationTimeout, deactivationTimeout; return getAdapter(activationTimeout, deactivationTimeout, id, upToDate); } @@ -441,6 +448,11 @@ ServerEntry::getAdapter(const string& id, bool upToDate) AdapterPrx ServerEntry::getAdapter(int& activationTimeout, int& deactivationTimeout, const string& id, bool upToDate) { + // + // NOTE: this might throw AdapterNotExistException, NodeUnreachableException + // or DeploymentException. + // + { Lock sync(*this); if(_loaded.get() || _proxy && _synchronizing && !upToDate) // Synced or if not up to date is fine -- cgit v1.2.3