Hey Bruce, this change breaks a bunch of tests in the ra module. The
RA does support XA and has some giggery pokery to manage the sessions.
Think this should be reverted.
Hudson has the failures; see the ra module:
https://hudson.apache.org/hudson/job/ActiveMQ/504/#showFailuresLink

On 8 November 2010 18:19,  <[email protected]> wrote:
> 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;
>
>
>



-- 
http://blog.garytully.com
http://fusesource.com

Reply via email to