You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2006/02/21 17:19:34 UTC

svn commit: r379513 - in /db/derby/code/branches/10.1/java: client/org/apache/derby/client/net/NetXAResource.java drda/org/apache/derby/impl/drda/DRDAXAProtocol.java

Author: kmarsden
Date: Tue Feb 21 08:19:30 2006
New Revision: 379513

URL: http://svn.apache.org/viewcvs?rev=379513&view=rev
Log:
DERBY-960  Client xa prepare returns XA_OK instead of XA_RDONLY for a read only transaction
port from trunk.  Tests will be ported once DERBY-435 is complete
Verified fix with repro.




Modified:
    db/derby/code/branches/10.1/java/client/org/apache/derby/client/net/NetXAResource.java
    db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java

Modified: db/derby/code/branches/10.1/java/client/org/apache/derby/client/net/NetXAResource.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/client/org/apache/derby/client/net/NetXAResource.java?rev=379513&r1=379512&r2=379513&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/client/org/apache/derby/client/net/NetXAResource.java (original)
+++ db/derby/code/branches/10.1/java/client/org/apache/derby/client/net/NetXAResource.java Tue Feb 21 08:19:30 2006
@@ -413,7 +413,7 @@
         } finally {
             conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo
         }
-        if (rc != XAResource.XA_OK) {
+        if ((rc != XAResource.XA_OK ) && (rc != XAResource.XA_RDONLY)) {
             throwXAException(rc, false);
         }
         if (conn_.agent_.loggingEnabled()) {

Modified: db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java?rev=379513&r1=379512&r2=379513&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java (original)
+++ db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java Tue Feb 21 08:19:30 2006
@@ -425,7 +425,7 @@
 		int xaRetVal = xaResource.XA_OK;
 
 		try {
-			xaResource.prepare(xid);
+			xaRetVal = xaResource.prepare(xid);
 			if (SanityManager.DEBUG)
 			{
 				connThread.trace("prepared xa transaction: xaRetVal=" +