summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerCache.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-12-03 15:04:10 +0100
committerBenoit Foucher <benoit@zeroc.com>2007-12-03 15:04:10 +0100
commit7bae461be57d06320c1d7860e6967bcd0b14718c (patch)
tree1763ec9f485e6f1ad0af51fa2c8fa6ae6e409907 /cpp/src/IceGrid/ServerCache.cpp
parentAdded more @deprecated tags to the Java generated code to reduce the number o... (diff)
downloadice-7bae461be57d06320c1d7860e6967bcd0b14718c.tar.bz2
ice-7bae461be57d06320c1d7860e6967bcd0b14718c.tar.xz
ice-7bae461be57d06320c1d7860e6967bcd0b14718c.zip
- 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
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.cpp')
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp30
1 files changed, 21 insertions, 9 deletions
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