Author: tabish
Date: Wed May 16 15:07:39 2012
New Revision: 1339214
URL: http://svn.apache.org/viewvc?rev=1339214&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-402
Modified:
activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp
Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp?rev=1339214&r1=1339213&r2=1339214&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/ConnectionStateTracker.cpp
Wed May 16 15:07:39 2012
@@ -587,30 +587,9 @@ Pointer<Command> ConnectionStateTracker:
////////////////////////////////////////////////////////////////////////////////
Pointer<Command> ConnectionStateTracker::processMessageAck( MessageAck* ack ) {
-
- try{
-
- if( trackTransactions && ack != NULL && ack->getTransactionId()
!= NULL) {
- Pointer<ConnectionId> connectionId;// =
- ack->getConsumerId()->getParentId()->getParentId();
- if( connectionId != NULL ) {
- Pointer<ConnectionState> cs = connectionStates.get( connectionId );
- if( cs != NULL ) {
- Pointer<TransactionState> transactionState =
- cs->getTransactionState( ack->getTransactionId() );
- if( transactionState != NULL ) {
- transactionState->addCommand(
- Pointer<Command>( ack->cloneDataStructure() ) );
- }
- }
- }
- return TRACKED_RESPONSE_MARKER;
- }
- return Pointer<Response>();
- }
- AMQ_CATCH_RETHROW( ActiveMQException )
- AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
- AMQ_CATCHALL_THROW( ActiveMQException )
+ // Do nothing here, acks would be stale on connection restore. Allow the rollback
+ // to deal with these as they are rolled back and redelivered.
+ return Pointer<Response>();
}
////////////////////////////////////////////////////////////////////////////////
|