activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r508800 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
Date Sat, 17 Feb 2007 19:43:06 GMT
Author: tabish
Date: Sat Feb 17 11:43:05 2007
New Revision: 508800

URL: http://svn.apache.org/viewvc?view=rev&rev=508800
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h?view=diff&rev=508800&r1=508799&r2=508800
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
Sat Feb 17 11:43:05 2007
@@ -36,13 +36,10 @@
         // Session Info - We do not own this
         const SessionInfo* session;
 
-        // Locally generated Transaction Id
-        long long transactionId;
-
     public:
 
         OpenWireTransactionInfo() {
-            transactionId = 0;
+            transactionInfo = NULL;
             session = NULL;
         }
 
@@ -53,7 +50,11 @@
          * @return integral vlaue of the Id
          */
         virtual long long getTransactionId(void) const {
-            return this->transactionId;
+            if( transactionInfo != NULL ) {
+                return ( dynamic_cast<commands::LocalTransactionId*>(
+                    transactionInfo->getTransactionId() ) )->getValue();
+            }
+            return 0;
         }
 
         /**
@@ -61,7 +62,10 @@
          * @param id integral value of the Id
          */
         virtual void setTransactionId( long long id ) {
-            this->transactionId = id;
+            if( transactionInfo != NULL ) {
+                ( dynamic_cast<commands::LocalTransactionId*>(
+                    this->transactionInfo->getTransactionId() ) )->setValue( id
);
+            }
         }
 
         /**



Mime
View raw message