activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r522661 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Date Mon, 26 Mar 2007 23:32:18 GMT
Author: tabish
Date: Mon Mar 26 16:32:17 2007
New Revision: 522661

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

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&rev=522661&r1=522660&r2=522661
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Mon Mar 26 16:32:17 2007
@@ -1003,17 +1003,24 @@
                 dynamic_cast<const OpenWireTransactionInfo*>(
                     session->getTransactionInfo() );
 
-            if( transactionInfo == NULL ) {
+            if( transactionInfo == NULL ||
+                transactionInfo->getTransactionInfo() == NULL ||
+                transactionInfo->getTransactionInfo()->getTransactionId() == NULL )
{
                 throw OpenWireConnectorException(
                     __FILE__, __LINE__,
                     "OpenWireConnector::acknowledge - "
                     "Transacted Session, has no Transaction Info.");
             }
 
-            ack.setTransactionId(
+            const commands::TransactionId* transactionId = 
+                dynamic_cast<const commands::TransactionId*>(
+                    transactionInfo->getTransactionInfo()->getTransactionId() );
+
+            commands::TransactionId* clonedTransactionId =
                 dynamic_cast<commands::TransactionId*>(
-                    transactionInfo->getTransactionInfo()->
-                        getTransactionId()->cloneDataStructure() ) );
+                    transactionId->cloneDataStructure() );
+
+            ack.setTransactionId( clonedTransactionId );
         }
 
         oneway( &ack );



Mime
View raw message