diff options
author | Matthew Newhook <matthew@zeroc.com> | 2007-09-04 17:27:59 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2007-09-04 17:27:59 +0800 |
commit | 612f04376ea27756c44a058f9512aaf2a3c095b9 (patch) | |
tree | 403163cec5182251a080f9a795d4c73d4f2f1e9d /cpp/src/Freeze/TransactionI.h | |
parent | fix bug with test/Slice/keyword/run.py (diff) | |
download | ice-612f04376ea27756c44a058f9512aaf2a3c095b9.tar.bz2 ice-612f04376ea27756c44a058f9512aaf2a3c095b9.tar.xz ice-612f04376ea27756c44a058f9512aaf2a3c095b9.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2451
Squashed commit of the following:
commit f4ba9698ababcd06659be2c941fb1809833764ee
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:25:35 2007 +0800
some cleanup.
commit 58dae2c8e42132d645e8cbfce7ac6856995d3241
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:20:22 2007 +0800
added more dire warning comments.
commit c95d285943268c3623d61ccae8cc4d4654cf8056
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:09:32 2007 +0800
remove debug. added comment.
commit 8eed648a285edcf6b256ca9195021e36e437ac36
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:04:12 2007 +0800
Copy the connection to prevent the transaction from accessing itself after its been blown away.
commit 08523da6819abf029f67178a51c09b39e41168ca
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 16:25:40 2007 +0800
first set of fixes for the reference counting.
Diffstat (limited to 'cpp/src/Freeze/TransactionI.h')
-rw-r--r-- | cpp/src/Freeze/TransactionI.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/cpp/src/Freeze/TransactionI.h b/cpp/src/Freeze/TransactionI.h index b8e5a9a582d..a44e782bbc0 100644 --- a/cpp/src/Freeze/TransactionI.h +++ b/cpp/src/Freeze/TransactionI.h @@ -10,6 +10,7 @@ #ifndef FREEZE_TRANSACTIONI_H #define FREEZE_TRANSACTIONI_H +#include <Ice/CommunicatorF.h> #include <Freeze/Transaction.h> #include <db_cxx.h> @@ -27,7 +28,6 @@ public: }; typedef IceUtil::Handle<PostCompletionCallback> PostCompletionCallbackPtr; - class TransactionI : public Transaction { public: @@ -41,12 +41,11 @@ public: // // Custom refcounting implementation // - virtual void __incRef(); virtual void __decRef(); void setPostCompletionCallback(const PostCompletionCallbackPtr&); - TransactionI(ConnectionI*); + TransactionI(const ConnectionIPtr&); ~TransactionI(); DbTxn* @@ -55,23 +54,15 @@ public: return _txn; } - const ConnectionI* - getConnectionI() const - { - return _connection; - } - private: friend class ConnectionI; - void internalIncRef(); - void internalDecRef(); - void postCompletion(bool, bool); - ConnectionI* const _connection; - Ice::Int _txTrace; + const Ice::CommunicatorPtr _communicator; + ConnectionIPtr _connection; + const Ice::Int _txTrace; DbTxn* _txn; PostCompletionCallbackPtr _postCompletionCallback; }; |