summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AdminSessionI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2010-02-19 18:45:14 +0100
committerBenoit Foucher <benoit@zeroc.com>2010-02-19 18:45:14 +0100
commitea9a8bcfc079175205766491ab217e65536a656f (patch)
tree8dd6cd069f9966bd59d72587052a42195d45cf63 /cpp/src/IceGrid/AdminSessionI.cpp
parentadded txt to ICE_LICENSE (diff)
downloadice-ea9a8bcfc079175205766491ab217e65536a656f.tar.bz2
ice-ea9a8bcfc079175205766491ab217e65536a656f.tar.xz
ice-ea9a8bcfc079175205766491ab217e65536a656f.zip
Fixed bug 4677 - IceGrid update hang
Diffstat (limited to 'cpp/src/IceGrid/AdminSessionI.cpp')
-rw-r--r--cpp/src/IceGrid/AdminSessionI.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp
index fb2392946d0..0a5b293c475 100644
--- a/cpp/src/IceGrid/AdminSessionI.cpp
+++ b/cpp/src/IceGrid/AdminSessionI.cpp
@@ -231,19 +231,40 @@ AdminSessionI::getReplicaName(const Ice::Current& current) const
FileIteratorPrx
AdminSessionI::openServerLog(const string& id, const string& path, int nLines, const Ice::Current& current)
{
- return addFileIterator(_database->getServer(id)->getProxy(), "#" + path, nLines, current);
+ try
+ {
+ return addFileIterator(_database->getServer(id)->getProxy(false, 5), "#" + path, nLines, current);
+ }
+ catch(const SynchronizationException&)
+ {
+ throw DeploymentException("server is being updated");
+ }
}
FileIteratorPrx
AdminSessionI::openServerStdOut(const string& id, int nLines, const Ice::Current& current)
{
- return addFileIterator(_database->getServer(id)->getProxy(), "stdout", nLines, current);
+ try
+ {
+ return addFileIterator(_database->getServer(id)->getProxy(false, 5), "stdout", nLines, current);
+ }
+ catch(const SynchronizationException&)
+ {
+ throw DeploymentException("server is being updated");
+ }
}
FileIteratorPrx
AdminSessionI::openServerStdErr(const string& id, int nLines, const Ice::Current& current)
{
- return addFileIterator(_database->getServer(id)->getProxy(), "stderr", nLines, current);
+ try
+ {
+ return addFileIterator(_database->getServer(id)->getProxy(false, 5), "stderr", nLines, current);
+ }
+ catch(const SynchronizationException&)
+ {
+ throw DeploymentException("server is being updated");
+ }
}
FileIteratorPrx