[jboss-cvs] JBossAS SVN: r75347 - trunk/testsuite/src/main/org/jboss/test/jca/adapter.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 3 09:14:38 EDT 2008


Author: adrian at jboss.org
Date: 2008-07-03 09:14:38 -0400 (Thu, 03 Jul 2008)
New Revision: 75347

Modified:
   trunk/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java
Log:
[JBAS-5714] - Include error code in the XAException from prepare() to avoid an heuristic outcome

Modified: trunk/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java	2008-07-03 12:35:43 UTC (rev 75346)
+++ trunk/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java	2008-07-03 13:14:38 UTC (rev 75347)
@@ -50,6 +50,7 @@
 /**
  * TestManagedConnection.java
  *
+ * TODO fix all the XAExceptions to throw the correct error code
  * @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
  * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version <tt>$Revision$</tt>
@@ -351,7 +352,11 @@
          if (state != SUSPENDED && state != ENDED)
             throw new XAException("Invalid prepare state=" + state + " xid=" + gid + " " + this);
          if (failInPrepare) 
-            throw new XAException(xaCode + " for " + this);
+         {
+            XAException xae = new XAException(xaCode + " for " + this);
+            xae.errorCode = xaCode;
+            throw xae;
+         }
          xids.put(gid, PREPARED);
          return XA_OK;
       }




More information about the jboss-cvs-commits mailing list