activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1078130 - /activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
Date Fri, 04 Mar 2011 20:57:41 GMT
Author: tabish
Date: Fri Mar  4 20:57:41 2011
New Revision: 1078130

URL: http://svn.apache.org/viewvc?rev=1078130&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-354

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=1078130&r1=1078129&r2=1078130&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
Fri Mar  4 20:57:41 2011
@@ -82,17 +82,32 @@ namespace core {
         virtual ~TransactionSynhcronization() {}
 
         virtual void beforeEnd() throw( exceptions::ActiveMQException ) {
-            consumer->acknowledge();
+            try {
+                consumer->acknowledge();
+            } catch( cms::CMSException& ex ) {
+                throw ActiveMQException( __FILE__, __LINE__, ex.getMessage().c_str() );
+            }
+
             consumer->setSynchronizationRegistered( false );
         }
 
         virtual void afterCommit() throw( exceptions::ActiveMQException ) {
-            consumer->commit();
+            try {
+                consumer->commit();
+            } catch( cms::CMSException& ex ) {
+                throw ActiveMQException( __FILE__, __LINE__, ex.getMessage().c_str() );
+            }
+
             consumer->setSynchronizationRegistered( false );
         }
 
         virtual void afterRollback() throw( exceptions::ActiveMQException ) {
-            consumer->rollback();
+            try {
+                consumer->rollback();
+            } catch( cms::CMSException& ex ) {
+                throw ActiveMQException( __FILE__, __LINE__, ex.getMessage().c_str() );
+            }
+
             consumer->setSynchronizationRegistered( false );
         }
 



Mime
View raw message