summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Outgoing.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-03-03 14:10:40 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-03-03 14:10:40 +0000
commite642c24a430dc350b3b14b5a925376084f8a7602 (patch)
treec494bf31e6c52a327e46a47e4fdf0e98872c6784 /cppe/src/IceE/Outgoing.cpp
parentFix (diff)
downloadice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.bz2
ice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.xz
ice-e642c24a430dc350b3b14b5a925376084f8a7602.zip
Ported fix for bug 574 and retry test
Diffstat (limited to 'cppe/src/IceE/Outgoing.cpp')
-rw-r--r--cppe/src/IceE/Outgoing.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/cppe/src/IceE/Outgoing.cpp b/cppe/src/IceE/Outgoing.cpp
index ad684ded0f0..7219fa58ae1 100644
--- a/cppe/src/IceE/Outgoing.cpp
+++ b/cppe/src/IceE/Outgoing.cpp
@@ -19,23 +19,31 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
-IceInternal::NonRepeatable::NonRepeatable(const NonRepeatable& ex)
+IceInternal::LocalExceptionWrapper::LocalExceptionWrapper(const LocalException& ex, bool r) :
+ _retry(r)
{
- _ex.reset(dynamic_cast<LocalException*>(ex.get()->ice_clone()));
+ _ex.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
}
-IceInternal::NonRepeatable::NonRepeatable(const ::Ice::LocalException& ex)
+IceInternal::LocalExceptionWrapper::LocalExceptionWrapper(const LocalExceptionWrapper& ex) :
+ _retry(ex._retry)
{
- _ex.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
+ _ex.reset(dynamic_cast<LocalException*>(ex.get()->ice_clone()));
}
-const ::Ice::LocalException*
-IceInternal::NonRepeatable::get() const
+const LocalException*
+IceInternal::LocalExceptionWrapper::get() const
{
assert(_ex.get());
return _ex.get();
}
+bool
+IceInternal::LocalExceptionWrapper::retry() const
+{
+ return _retry;
+}
+
IceInternal::Outgoing::Outgoing(Connection* connection, Reference* ref, const string& operation,
OperationMode mode, const Context& context) :
_connection(connection),
@@ -148,11 +156,11 @@ IceInternal::Outgoing::invoke()
}
//
- // Throw the exception wrapped in a NonRepeatable, to
+ // Throw the exception wrapped in a LocalExceptionWrapper, to
// indicate that the request cannot be resent without
// potentially violating the "at-most-once" principle.
//
- throw NonRepeatable(*_exception.get());
+ throw LocalExceptionWrapper(*_exception.get(), false);
}
if(_state == StateUserException)
@@ -221,7 +229,7 @@ IceInternal::Outgoing::abort(const LocalException& ex)
// only the batch request that caused the problem will be
// aborted, but all other requests in the batch as well.
//
- throw NonRepeatable(ex);
+ throw LocalExceptionWrapper(ex, false);
}
#endif