summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ProxyFactory.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2009-01-23 17:07:21 -0500
committerBernard Normier <bernard@zeroc.com>2009-01-23 17:07:21 -0500
commit2380e089401d048490da23bc6d71e5687bafbe47 (patch)
tree6d97052d1f93bc2bafcd7fd1a9ebe103544b6cad /cpp/src/Ice/ProxyFactory.cpp
parentFixed permissions (diff)
parent3.3.1 third-party updates (diff)
downloadice-2380e089401d048490da23bc6d71e5687bafbe47.tar.bz2
ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.xz
ice-2380e089401d048490da23bc6d71e5687bafbe47.zip
Merge branch 'R3_3_branch' of cvs:/home/git/ice into R3_3_branch
Conflicts: java/resources/IceGridAdmin/icegridadmin_content_dyn.html java/resources/IceGridAdmin/icegridadmin_content_static.html
Diffstat (limited to 'cpp/src/Ice/ProxyFactory.cpp')
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp67
1 files changed, 15 insertions, 52 deletions
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index 2fc5316eb6d..4e5b67217fd 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -25,32 +25,8 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
-namespace
-{
-
-class RetryTask : public IceUtil::TimerTask
-{
-public:
-
- RetryTask(const OutgoingAsyncPtr& out) : _out(out)
- {
- }
-
- virtual void
- runTimerTask()
- {
- _out->__send();
- }
-
-private:
-
- const OutgoingAsyncPtr _out;
-};
-
-}
-
IceUtil::Shared* IceInternal::upCast(ProxyFactory* p) { return p; }
-
+
ObjectPrx
IceInternal::ProxyFactory::stringToProxy(const string& str) const
{
@@ -149,7 +125,11 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex,
// We retry ObjectNotExistException if the reference is
// indirect.
//
- li->clearObjectCache(ref);
+
+ if(ref->isWellKnown())
+ {
+ li->clearCache(ref);
+ }
}
else if(ref->getRouterInfo() && one->operation == "ice_add_proxy")
{
@@ -243,34 +223,17 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex,
}
out << " because of exception\n" << ex;
}
-
- if(interval > 0)
+
+ if(out)
{
- if(out)
- {
- try
- {
- _instance->timer()->schedule(new RetryTask(out), IceUtil::Time::milliSeconds(interval));
- }
- catch(const IceUtil::IllegalArgumentException&) // Expected if the communicator destroyed the timer.
- {
- throw CommunicatorDestroyedException(__FILE__, __LINE__);
- }
- }
- else
- {
- //
- // Sleep before retrying.
- //
- IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(interval));
- }
+ out->__retry(interval);
}
- else
+ else if(interval > 0)
{
- if(out)
- {
- out->__send();
- }
+ //
+ // Sleep before retrying.
+ //
+ IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(interval));
}
}