You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2006/02/23 01:00:40 UTC

[jira] Commented: (DERBY-1010) setTransactionIsolation can cause ava.sql.SQLException: Invalid operation: statement closed in some contexts with xa

    [ http://issues.apache.org/jira/browse/DERBY-1010?page=comments#action_12367450 ] 

Kathey Marsden commented on DERBY-1010:
---------------------------------------

Checked in a fix to 10.2 for this.

Date: Wed Feb 22 15:57:30 2006
New Revision: 379993

URL: http://svn.apache.org/viewcvs?rev=379993&view=rev
Log:
DERBY-1010 - setTransactionIsolation can cause ava.sql.SQLException: Invalid operation: statement closed in some contexts with xa

Client has a Statement object that it reuses to send SET CURRENT ISOLATION commands to the server.  Added a check to make sure this statement was not closed before trying to reuse it.

This change takes the checkDataSource test a bit further (DERBY-435) but there seem to be issues with isolation being set correctly with xa_join.  I will investigate that and file a Jira issue


> setTransactionIsolation can cause ava.sql.SQLException: Invalid operation: statement closed in some contexts with xa
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1010
>          URL: http://issues.apache.org/jira/browse/DERBY-1010
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0, 10.1.3.0, 10.1.2.3
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden

>
> With xa setTransactionIsolation can cause a statement closed exception when calling 
> setTransactionIsolation
> Client tries to reuse a statement for sending SET CURRENT ISOLATION statements to the server.  There must be some problems with this logic where it is trying to use a closed statement.  Perhaps an overall better strategy would be to use an EXCSQLSET to send the set commands to the server and then invoke the embedded JDBC setTransactionIsolation call on the server as Oyvind did for setQueryTimeout.  Using the SET ISOLATION statements on the client has caused a variety of problems.
> // setTransactionIsolation in some contexts used in this test is 
> 	// causing  java.sql.SQLException: Invalid operation: statement closed
> 	// error on client. These cases are omitted for now where they cause the
> 	// statement closed error
> 	private static boolean  causesStmtClosedOnSetTransactionIsolation = TestUtil.isDerbyNetClientFramework();
> java.sql.SQLException: Invalid operation: statement closed
>         at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:280)
>         at org.apache.derby.client.am.Statement.executeUpdate(Statement.java:437)
>         at org.apache.derby.client.am.Connection.setTransactionIsolation(Connection.java:911)
>         at org.apache.derby.client.am.LogicalConnection.setTransactionIsolation(LogicalConnection.java:184)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDataSource.runTest(checkDataSource.java:404)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDataSource.main(checkDataSource.java:119)
> Caused by: org.apache.derby.client.am.SqlException: Invalid operation: statement closed
>         at org.apache.derby.client.am.Statement.checkForClosedStatement(Statement.java:2231)
>         at org.apache.derby.client.am.Statement.flowExecute(Statement.java:1737)
>         at org.apache.derby.client.am.Statement.executeUpdateX(Statement.java:442)
>         at org.apache.derby.client.am.Statement.executeUpdate(Statement.java:428)
>         ... 4 more
> Exception in thread "main" D>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira