commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1563710 - in /commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src: changes/changes.xml main/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java
Date Sun, 02 Feb 2014 20:45:14 GMT
Author: markt
Date: Sun Feb  2 20:45:14 2014
New Revision: 1563710

URL: http://svn.apache.org/r1563710
Log:
Fix DBCP-341
LocalXAConnectionFactory does not properly check if Xid is equal to currentXid when resuming
which may result in an XAException.
Patch by Ioannis Canellos

Modified:
    commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml
    commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java

Modified: commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml?rev=1563710&r1=1563709&r2=1563710&view=diff
==============================================================================
--- commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml (original)
+++ commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/changes/changes.xml Sun Feb  2 20:45:14
2014
@@ -83,6 +83,10 @@ The <action> type attribute can be add,u
         connection is consistent when the underlying connection is closed as a
         result of an error condition.
       </action>
+      <action dev="markt" issue="DBCP-341" type="fix" due-to="Ioannis Canellos">
+        LocalXAConnectionFactory does not properly check if Xid is equal to
+        currentXid when resuming which may result in an XAException.
+      </action>
     </release>
     <release version="1.4.1" date="TBD" description="TBD">
       <action dev="psteitz" issue="DBCP-367" type="fix" due-to="Ken Tatsushita">

Modified: commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java?rev=1563710&r1=1563709&r2=1563710&view=diff
==============================================================================
--- commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java
(original)
+++ commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/main/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java
Sun Feb  2 20:45:14 2014
@@ -136,7 +136,7 @@ public class LocalXAConnectionFactory im
 
                 this.currentXid = xid;
             } else if (flag == XAResource.TMRESUME) {
-                if (xid != this.currentXid) {
+                if (!xid.equals(this.currentXid)) {
                     throw new XAException("Attempting to resume in different transaction:
expected " + this.currentXid + ", but was " + xid);
                 }
             } else {



Mime
View raw message