Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 1972 invoked from network); 26 Mar 2007 23:32:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Mar 2007 23:32:41 -0000 Received: (qmail 6615 invoked by uid 500); 26 Mar 2007 23:32:48 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 6594 invoked by uid 500); 26 Mar 2007 23:32:47 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 6585 invoked by uid 99); 26 Mar 2007 23:32:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2007 16:32:47 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2007 16:32:39 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id B08511A9842; Mon, 26 Mar 2007 16:32:19 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070326233219.B08511A9842@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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( 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( + transactionInfo->getTransactionInfo()->getTransactionId() ); + + commands::TransactionId* clonedTransactionId = dynamic_cast( - transactionInfo->getTransactionInfo()-> - getTransactionId()->cloneDataStructure() ) ); + transactionId->cloneDataStructure() ); + + ack.setTransactionId( clonedTransactionId ); } oneway( &ack );