db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r423141 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ engine/org/apache/derby/impl/jdbc/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/jdbc4/
Date Tue, 18 Jul 2006 17:22:34 GMT
Author: davidvc
Date: Tue Jul 18 10:22:33 2006
New Revision: 423141

URL: http://svn.apache.org/viewvc?rev=423141&view=rev
Log:
DERBY-1395: Change the client SQLState to match that of embedded for the 
exception thrown on a closed statement whose connection is also closed.
Also fix this for when the connection is still open, they were not
consistent.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
    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/jdbc4/ClosedObjectTest.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=423141&r1=423140&r2=423141&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Tue Jul 18 10:22:33
2006
@@ -2427,7 +2427,7 @@
         if (!openOnClient_) {
             agent_.checkForDeferredExceptions();
             throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.LANG_STATEMENT_CLOSED_NO_REASON));
+                new ClientMessageId(SQLState.ALREADY_CLOSED), "Statement");
         } else {
             agent_.checkForDeferredExceptions();
         }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=423141&r1=423140&r2=423141&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Tue Jul
18 10:22:33 2006
@@ -1319,9 +1319,17 @@
      * @see #checkExecStatus()
 	 */
     final void checkStatus() throws SQLException {
+		if (!active) {
+            // 
+            // Check the status of the connection first
+            //
+            java.sql.Connection appConn = getEmbedConnection().getApplicationConnection();
+            if (appConn == null || appConn.isClosed()) {
+                throw Util.noCurrentConnection();
+            }
 
-		if (!active)
-			throw newSQLException(SQLState.ALREADY_CLOSED, "Statement");
+            throw newSQLException(SQLState.ALREADY_CLOSED, "Statement");
+        }
 	}
 
 	/**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out?rev=423141&r1=423140&r2=423141&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 Jul 18 10:22:33 2006
@@ -8,7 +8,7 @@
 method calls on a closed connection
 Nested <closedconn>.close() no error
 Nested <closedconn>.createStatement() 08003 - No current connection.
-Nested <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Nested <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on DriverManager 
   isolation level 2
   auto commit     true
@@ -19,7 +19,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on DataSource
   isolation level 2
   auto commit     true
@@ -31,7 +31,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on SimpleDataSource
   isolation level 2
   auto commit     true
@@ -43,7 +43,7 @@
 method calls on a closed connection
 SimpleDataSource <closedconn>.close() no error
 SimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
-SimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+SimpleDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -56,7 +56,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -69,7 +69,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed pooled connection
 EVENT(1):connectionClosed
 expected SQL Exception: (08003) No current connection.
@@ -91,7 +91,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed local XAConnection
 EVENT(3):connectionClosed
 Start testPoolReset XADataSource
@@ -110,7 +110,7 @@
 method calls on a closed connection
 Nested <closedconn>.close() no error
 Nested <closedconn>.createStatement() 08003 - No current connection.
-Nested <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Nested <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on DriverManager 
   isolation level 2
   auto commit     true
@@ -121,7 +121,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on DataSource
   isolation level 2
   auto commit     true
@@ -133,7 +133,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on EmbeddedSimpleDataSource
   isolation level 2
   auto commit     true
@@ -145,7 +145,7 @@
 method calls on a closed connection
 EmbeddedSimpleDataSource <closedconn>.close() no error
 EmbeddedSimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedSimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+EmbeddedSimpleDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -158,7 +158,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -171,7 +171,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on XADataSource
   isolation level 2
   auto commit     true
@@ -184,7 +184,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on XADataSource
   isolation level 2
   auto commit     true
@@ -197,7 +197,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 EVENT(5):connectionClosed
 Running connection checks on Global XADataSource
   isolation level 2
@@ -210,7 +210,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Global XADataSource
   isolation level 2
   auto commit     false
@@ -222,7 +222,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
@@ -235,7 +235,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
@@ -248,7 +248,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
@@ -261,7 +261,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
@@ -274,7 +274,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 initial local
   isolation level READ_COMMITTED
   auto commit     true

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out?rev=423141&r1=423140&r2=423141&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 Jul 18 10:22:33 2006
@@ -11,7 +11,7 @@
 method calls on a closed connection
 Nested <closedconn>.close() no error
 Nested <closedconn>.createStatement() 08003 - No current connection.
-Nested <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Nested <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on DriverManager 
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -25,7 +25,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on DataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -40,7 +40,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on SimpleDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -55,7 +55,7 @@
 method calls on a closed connection
 SimpleDataSource <closedconn>.close() no error
 SimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
-SimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+SimpleDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -71,7 +71,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -87,7 +87,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed pooled connection
 EVENT(1):connectionClosed
 expected SQL Exception: (08003) No current connection.
@@ -112,7 +112,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed local XAConnection
 EVENT(3):connectionClosed
 Start testPoolReset XADataSource
@@ -134,7 +134,7 @@
 method calls on a closed connection
 Nested <closedconn>.close() no error
 Nested <closedconn>.createStatement() 08003 - No current connection.
-Nested <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Nested <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on DriverManager 
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -148,7 +148,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on DataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -163,7 +163,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on EmbeddedSimpleDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -178,7 +178,7 @@
 method calls on a closed connection
 EmbeddedSimpleDataSource <closedconn>.close() no error
 EmbeddedSimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedSimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+EmbeddedSimpleDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -194,7 +194,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -210,7 +210,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -226,7 +226,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -242,7 +242,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 EVENT(5):connectionClosed
 Running JDBC 3.0 connection checks on Global XADataSource
   holdability     false
@@ -258,7 +258,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: (XJ058) Cannot rollback a global transaction using the
Connection, commit processing must go thru XAResource interface.
@@ -273,7 +273,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to local XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -289,7 +289,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to local XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: (XJ010) Cannot issue savepoint when autoCommit is on.
@@ -305,7 +305,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: (XJ058) Cannot rollback a global transaction using the
Connection, commit processing must go thru XAResource interface.
@@ -321,7 +321,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: (XJ058) Cannot rollback a global transaction using the
Connection, commit processing must go thru XAResource interface.
@@ -337,7 +337,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 initial local
   holdability     true
   isolation level READ_COMMITTED

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ClosedObjectTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ClosedObjectTest.java?rev=423141&r1=423140&r2=423141&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ClosedObjectTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ClosedObjectTest.java
Tue Jul 18 10:22:33 2006
@@ -487,9 +487,7 @@
             throws SQLException
         {
             String sqlState = sqle.getSQLState();
-            if (usingEmbedded() && sqlState.equals("XJ012")) {
-                // expected, do nothing
-            } else if (usingDerbyNetClient() && sqlState.equals("XCL31")) {
+            if (sqlState.equals("XJ012")) {
                 // expected, do nothing
             } else {
                 // unexpected exception



Mime
View raw message