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)" <ji...@apache.org> on 2007/04/06 18:08:32 UTC

[jira] Resolved: (DERBY-2481) Client PreparedStatement in a global xact does not downgrade ResultSetHoldability to CLOSE_CURSORS_AT_COMMIT

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

Kathey Marsden resolved DERBY-2481.
-----------------------------------

    Resolution: Duplicate

This issue is a duplicate DERBY-1370


> 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.