summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/ConnectionI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-09-18 11:21:00 -0400
committerBernard Normier <bernard@zeroc.com>2007-09-18 11:21:00 -0400
commit15fec2519f3bbea20349aa971f8a76cfa7c83363 (patch)
treebe529a224ece49a857f30e44af2888a95639868f /cpp/src/Freeze/ConnectionI.cpp
parentAdded comment to CHANGES (diff)
downloadice-15fec2519f3bbea20349aa971f8a76cfa7c83363.tar.bz2
ice-15fec2519f3bbea20349aa971f8a76cfa7c83363.tar.xz
ice-15fec2519f3bbea20349aa971f8a76cfa7c83363.zip
Squashed commit of the following:
commit 70a72ca50d39f20ab8d850f0842a8cd2c2a8351d Author: Bernard Normier <bernard@zeroc.com> Date: Tue Sep 18 11:18:19 2007 -0400 Bug fixes commit 2983094468845f39614128cd82973b9c503680a5 Author: Bernard Normier <bernard@zeroc.com> Date: Fri Sep 7 11:00:18 2007 -0400 First commit for bug 1532
Diffstat (limited to 'cpp/src/Freeze/ConnectionI.cpp')
-rw-r--r--cpp/src/Freeze/ConnectionI.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/cpp/src/Freeze/ConnectionI.cpp b/cpp/src/Freeze/ConnectionI.cpp
index 258060f9f5c..7bd9a114f13 100644
--- a/cpp/src/Freeze/ConnectionI.cpp
+++ b/cpp/src/Freeze/ConnectionI.cpp
@@ -44,17 +44,8 @@ Freeze::ConnectionI::close()
{
if(_transaction)
{
- try
- {
- _transaction->rollbackInternal(true);
- }
- catch(const DatabaseException&)
- {
- //
- // Ignored
- //
- }
- assert(!_transaction);
+ _transaction->rollbackInternal(true);
+ assert(_transaction == 0);
}
while(!_mapList.empty())
@@ -97,7 +88,13 @@ Freeze::ConnectionI::__decRef()
else if(_refCount == 1 && _transaction != 0 && _transaction->dbTxn() != 0 && _transaction->__getRefNoSync() == 1)
{
sync.release();
- close();
+ if(_transaction)
+ {
+ //
+ // This makes the transaction release the last refcount on the connection
+ //
+ _transaction->rollbackInternal(true);
+ }
}
}