diff options
author | Bernard Normier <bernard@zeroc.com> | 2010-06-28 11:17:15 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2010-06-28 11:17:15 -0400 |
commit | 9c4e3faa2e40a663fea745c4e6d6b616c81907c3 (patch) | |
tree | fd74287f4fe93da4edd8e4c306c9bf1bac2116c0 /cpp/src | |
parent | Fixed bug 4775 - build BdB with -O3 on OS X (diff) | |
download | ice-9c4e3faa2e40a663fea745c4e6d6b616c81907c3.tar.bz2 ice-9c4e3faa2e40a663fea745c4e6d6b616c81907c3.tar.xz ice-9c4e3faa2e40a663fea745c4e6d6b616c81907c3.zip |
Fixed bug #4786
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Freeze/TransactionI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Freeze/TransactionI.h | 5 | ||||
-rw-r--r-- | cpp/src/Freeze/TransactionalEvictorContext.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Freeze/TransactionalEvictorContext.h | 2 | ||||
-rw-r--r-- | cpp/src/Freeze/TransactionalEvictorI.cpp | 4 |
5 files changed, 11 insertions, 6 deletions
diff --git a/cpp/src/Freeze/TransactionI.cpp b/cpp/src/Freeze/TransactionI.cpp index 9d163ebacf0..ebadc48d632 100644 --- a/cpp/src/Freeze/TransactionI.cpp +++ b/cpp/src/Freeze/TransactionI.cpp @@ -273,7 +273,7 @@ Freeze::TransactionI::postCompletion(bool committed, bool deadlock) PostCompletionCallbackPtr cb = _postCompletionCallback; _postCompletionCallback = 0; - cb->postCompletion(committed, deadlock); + cb->postCompletion(committed, deadlock, _connection->dbEnv()); } ConnectionIPtr connection = _connection; diff --git a/cpp/src/Freeze/TransactionI.h b/cpp/src/Freeze/TransactionI.h index 4aa17c7c8e9..c3d392f588d 100644 --- a/cpp/src/Freeze/TransactionI.h +++ b/cpp/src/Freeze/TransactionI.h @@ -23,11 +23,14 @@ typedef IceUtil::Handle<ConnectionI> ConnectionIPtr; struct SharedMutex; typedef IceUtil::Handle<SharedMutex> SharedMutexPtr; +class SharedDbEnv; +typedef IceUtil::Handle<SharedDbEnv> SharedDbEnvPtr; + class PostCompletionCallback : public virtual IceUtil::Shared { public: - virtual void postCompletion(bool, bool) = 0; + virtual void postCompletion(bool, bool, const SharedDbEnvPtr&) = 0; }; typedef IceUtil::Handle<PostCompletionCallback> PostCompletionCallbackPtr; diff --git a/cpp/src/Freeze/TransactionalEvictorContext.cpp b/cpp/src/Freeze/TransactionalEvictorContext.cpp index 8cc26506930..09feb774b3f 100644 --- a/cpp/src/Freeze/TransactionalEvictorContext.cpp +++ b/cpp/src/Freeze/TransactionalEvictorContext.cpp @@ -102,8 +102,10 @@ Freeze::TransactionalEvictorContext::rollback() } void -Freeze::TransactionalEvictorContext::postCompletion(bool committed, bool deadlock) +Freeze::TransactionalEvictorContext::postCompletion(bool committed, bool deadlock, const SharedDbEnvPtr& dbEnv) { + dbEnv->setCurrentTransaction(0); + try { if(committed) diff --git a/cpp/src/Freeze/TransactionalEvictorContext.h b/cpp/src/Freeze/TransactionalEvictorContext.h index 894ccb0e873..2a0738f46e6 100644 --- a/cpp/src/Freeze/TransactionalEvictorContext.h +++ b/cpp/src/Freeze/TransactionalEvictorContext.h @@ -101,7 +101,7 @@ public: virtual ~TransactionalEvictorContext(); - virtual void postCompletion(bool, bool); + virtual void postCompletion(bool, bool, const SharedDbEnvPtr&); virtual bool response(bool); virtual bool exception(const std::exception&); diff --git a/cpp/src/Freeze/TransactionalEvictorI.cpp b/cpp/src/Freeze/TransactionalEvictorI.cpp index 074f5e1b564..87a84ee428b 100644 --- a/cpp/src/Freeze/TransactionalEvictorI.cpp +++ b/cpp/src/Freeze/TransactionalEvictorI.cpp @@ -356,10 +356,10 @@ Freeze::TransactionalEvictorI::dispatch(Request& request) } catch(...) { - _dbEnv->setCurrentTransaction(0); + assert(_dbEnv->getCurrent() == 0); throw; } - _dbEnv->setCurrentTransaction(0); + assert(_dbEnv->getCurrent() == 0); } } |