db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2481) Client PreparedStatement in a global xact does not downgrade ResultSetHoldability to CLOSE_CURSORS_AT_COMMIT
Date Fri, 23 Mar 2007 17:41:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483670
] 

Kathey Marsden commented on DERBY-2481:
---------------------------------------

Dan mentioned that some of the xa tests could be removed after this was converted.  Of the
xa tests
jdbcapi/xaAnotherTest.sql
jdbcapi/xaSimplePositive.sql
jdbcapi/xaSimpleNegative.sql
jdbcapi/xaStateTran.sql
jdbcapi/xaMorph.sql
store/xaOffline1.sql
store/xab2354.sql
unit/T_XA.unit

I think xaSimplePositive, xaSimpleNegative, and xaMorph can go.
Is that correct?

> Client PreparedStatement  in a global xact does not  downgrade ResultSetHoldability to
CLOSE_CURSORS_AT_COMMIT
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2481
>                 URL: https://issues.apache.org/jira/browse/DERBY-2481
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Kathey Marsden
>            Priority: Minor
>
> In converting XATest to junit I found that  PreparedStatements created in a global transaction
do not downgrade to CLOSE_CURSORS_AT_Commit. e.g the following code works fine for embedded
but not client. 
> I will refer to this bug in the converted test.
>   // JDBC 4.0 (proposed final draft) section allows
>             // drivers to change the holdability when creating
>             // a Statement object and attach a warning to the Connection.
>             Statement sglobalhold = conn.createStatement(
>                     ResultSet.TYPE_FORWARD_ONLY,
>                     ResultSet.CONCUR_READ_ONLY,
>                     ResultSet.HOLD_CURSORS_OVER_COMMIT);
>             assertEquals(ResultSet.CLOSE_CURSORS_AT_COMMIT, sglobalhold.getResultSetHoldability());
>             
>             sglobalhold.close();
>             PreparedStatement psglobalhold = conn.prepareStatement(
>                 "SELECT * FROM APP.FOO",
>                 ResultSet.TYPE_FORWARD_ONLY,
>                 ResultSet.CONCUR_READ_ONLY,
>                 ResultSet.HOLD_CURSORS_OVER_COMMIT);
>             assertEquals(ResultSet.CLOSE_CURSORS_AT_COMMIT, psglobalhold.getResultSetHoldability());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message