summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/ConnectionI.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-09-19 11:22:45 +1000
committerMichi Henning <michi@zeroc.com>2007-09-19 11:22:45 +1000
commitcd0338e842b7751c423f5384d247202d3c981be4 (patch)
tree2b2965f974c3f7f0dda3b94ed4d7c1c49175d375 /cpp/src/Freeze/ConnectionI.cpp
parentAdded more tests. Changed stack marshaling to reverse order during (diff)
parentAdded missing facet (diff)
downloadice-cd0338e842b7751c423f5384d247202d3c981be4.tar.bz2
ice-cd0338e842b7751c423f5384d247202d3c981be4.tar.xz
ice-cd0338e842b7751c423f5384d247202d3c981be4.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Conflicts: cs/src/Ice/Instance.cs Removed conflicts. Added more tests. Changed stack marshaling to reverse order during marshaling instead of during unmarshaling.
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);
+ }
}
}