diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-12-04 14:45:17 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-12-04 14:45:17 +0100 |
commit | 39623890a7fec210910e191e00d9f8252dfdd9ba (patch) | |
tree | eea40763f54d39172938f91956a56d08115c2f81 /cpp/src | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-39623890a7fec210910e191e00d9f8252dfdd9ba.tar.bz2 ice-39623890a7fec210910e191e00d9f8252dfdd9ba.tar.xz ice-39623890a7fec210910e191e00d9f8252dfdd9ba.zip |
Fix to not retry batch requests (even idempotent ones)
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 7 | ||||
-rw-r--r-- | cpp/src/Ice/ProxyFactory.cpp | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 0972e6644b1..47f3a55cf04 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -330,13 +330,6 @@ IceInternal::Outgoing::abort(const LocalException& ex) _handler->getReference()->getMode() == Reference::ModeBatchDatagram) { _handler->abortBatchRequest(); - - // - // If we abort a batch requests, we cannot retry, because not - // only the batch request that caused the problem will be - // aborted, but all other requests in the batch as well. - // - throw LocalExceptionWrapper(ex, false); } ex.ice_throw(); diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp index 4244066079d..2e55df12ce1 100644 --- a/cpp/src/Ice/ProxyFactory.cpp +++ b/cpp/src/Ice/ProxyFactory.cpp @@ -99,6 +99,16 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, co TraceLevelsPtr traceLevels = _instance->traceLevels(); LoggerPtr logger = _instance->initializationData().logger; + // + // We don't retry batch requests because the exception might have caused + // the all the requests batched with the connection to be aborted and we + // want the application to be notified. + // + if(ref->getMode() == Reference::ModeBatchOneway || ref->getMode() == Reference::ModeBatchDatagram) + { + ex.ice_throw(); + } + const ObjectNotExistException* one = dynamic_cast<const ObjectNotExistException*>(&ex); if(one) |