db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r394949 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ master/DerbyNetClient/ tests/jdbcapi/
Date Tue, 18 Apr 2006 14:08:14 GMT
Author: kmarsden
Date: Tue Apr 18 07:07:26 2006
New Revision: 394949

URL: http://svn.apache.org/viewcvs?rev=394949&view=rev
Log:
DERBY-1025 - [xa] client XAResource.start() does not commit an active local transaction when
auto commit is true
patch 2

I am attaching 'derby-1025-patch2-v1.diff' which changes checkDataSource test to test that
starting a global transcation when a local transaction is active will give an exception. The
XA error code is also printed out to verify that we get the expected exception. This patch
will resolve this issue fully.

Contributed by Deepa Remesh




Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out?rev=394949&r1=394948&r2=394949&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
Tue Apr 18 07:07:26 2006
@@ -460,7 +460,8 @@
 autocommitxastart expected 'ResultSet' already closed.
 acxs 1
 acxs 2
-autocommitxastart expected  : XAException - XAER_DUPID : Error executing a XAResource.start(),
Server returned XAER_DUPID
+autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(),
Server returned XAER_OUTSIDE
+Expected XA error code: -9
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00
 testing jira 95 for XADataSource; ok - expected exception: XCY00

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out?rev=394949&r1=394948&r2=394949&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
Tue Apr 18 07:07:26 2006
@@ -555,7 +555,8 @@
 autocommitxastart expected 'ResultSet' already closed.
 acxs 1
 acxs 2
-autocommitxastart expected  : XAException - XAER_DUPID : Error executing a XAResource.start(),
Server returned XAER_DUPID
+autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(),
Server returned XAER_OUTSIDE
+Expected XA error code: -9
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00
 testing jira 95 for XADataSource; ok - expected exception: XCY00

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out?rev=394949&r1=394948&r2=394949&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
Tue Apr 18 07:07:26 2006
@@ -525,6 +525,7 @@
 acxs 1
 acxs 2
 autocommitxastart expected  : XAException - null
+Expected XA error code: -9
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00
 testing jira 95 for XADataSource; ok - expected exception: XCY00

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out?rev=394949&r1=394948&r2=394949&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
Tue Apr 18 07:07:26 2006
@@ -655,6 +655,7 @@
 acxs 1
 acxs 2
 autocommitxastart expected  : XAException - null
+Expected XA error code: -9
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00
 testing jira 95 for XADataSource; ok - expected exception: XCY00

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java?rev=394949&r1=394948&r2=394949&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
Tue Apr 18 07:07:26 2006
@@ -646,10 +646,15 @@
 		rs4.next(); System.out.println("acxs " + rs4.getInt(1));
 		rs4.next(); System.out.println("acxs " + rs4.getInt(1));
 		
+		 // Get a new xid to begin another transaction. 
+		 // This should give XAER_OUTSIDE exception because
+		 // the resource manager is busy in the local transaction
+		 xid4a = new cdsXid(4, (byte) 93, (byte) 103);
 		try {
 			xac4.getXAResource().start(xid4a, XAResource.TMNOFLAGS);
 		} catch (XAException xae) {
 			showXAException("autocommitxastart expected ", xae);
+			System.out.println("Expected XA error code: " + xae.errorCode);
 		}
 		rs4.next(); System.out.println("acxs " + rs4.getInt(1));
 		rs4.close();



Mime
View raw message