[jboss-cvs] JBossAS SVN: r114843 - branches/JBPAPP_5_2_0_GA-JBPAPP-11232/connector/src/main/org/jboss/resource/adapter/jdbc/xa.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 20 14:33:15 EDT 2015
Author: jolee
Date: 2015-10-20 14:33:15 -0400 (Tue, 20 Oct 2015)
New Revision: 114843
Modified:
branches/JBPAPP_5_2_0_GA-JBPAPP-11232/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnection.java
Log:
JBPAPP-11232: refining isFailedXA check to XA_RB* errors and fail connections if not
Modified: branches/JBPAPP_5_2_0_GA-JBPAPP-11232/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnection.java
===================================================================
--- branches/JBPAPP_5_2_0_GA-JBPAPP-11232/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnection.java 2015-10-20 17:48:25 UTC (rev 114842)
+++ branches/JBPAPP_5_2_0_GA-JBPAPP-11232/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnection.java 2015-10-20 18:33:15 UTC (rev 114843)
@@ -212,11 +212,11 @@
{
xaResource.start(xid, flags);
}
- catch(XAException e)
+ catch (XAException e)
{
//JBAS-3336 Connections that fail in enlistment should not be returned
//to the pool
- if(isFailedXA(e.errorCode))
+ if (isFailedXA(e.errorCode))
{
broadcastConnectionError(e);
}
@@ -238,16 +238,20 @@
public void end(Xid xid, int flags) throws XAException
{
- lock();
+ lock();
try
{
try
{
xaResource.end(xid, flags);
}
- catch(XAException e)
+ catch (XAException e)
{
- broadcastConnectionError(e);
+ if (isFailedXA(e.errorCode))
+ {
+ broadcastConnectionError(e);
+ }
+
throw e;
}
@@ -320,7 +324,6 @@
private boolean isFailedXA(int errorCode)
{
-
- return (errorCode == XAException.XAER_RMERR || errorCode == XAException.XAER_RMFAIL);
+ return !(errorCode >= XAException.XA_RBBASE && errorCode <= XAException.XA_RBEND);
}
}
More information about the jboss-cvs-commits
mailing list