activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bsny...@apache.org
Subject svn commit: r1032658 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
Date Mon, 08 Nov 2010 18:19:23 GMT
Author: bsnyder
Date: Mon Nov  8 18:19:23 2010
New Revision: 1032658

URL: http://svn.apache.org/viewvc?rev=1032658&view=rev
Log:
AMQ-3022 - Improve error message when a transaction is attempted to be suspended/resumed

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java?rev=1032658&r1=1032657&r2=1032658&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
Mon Nov  8 18:19:23 2010
@@ -334,12 +334,17 @@ public class TransactionContext implemen
             throw new XAException(XAException.XAER_PROTO);
         }
 
-        // if ((flags & TMJOIN) == TMJOIN) {
-        // // TODO: verify that the server has seen the xid
-        // }
-        // if ((flags & TMJOIN) == TMRESUME) {
-        // // TODO: verify that the xid was suspended.
-        // }
+        String txSuspendResumeNotSupportMsg = "The suspend/resume of a transaction " 
+        	+ "is not supported. Instead it is recommended that a new JMS session be created.";
+        
+        if ((flags & TMJOIN) == TMJOIN) {
+        	throw new XAException(txSuspendResumeNotSupportMsg);
+        // TODO: verify that the server has seen the xid
+        }
+        if ((flags & TMRESUME) == TMRESUME) {
+        	throw new XAException(txSuspendResumeNotSupportMsg);
+        // TODO: verify that the xid was suspended.
+        }
 
         // associate
         synchronizations = null;



Mime
View raw message