[
https://issues.apache.org/jira/browse/DERBY-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Hillegas updated DERBY-4869:
---------------------------------
Attachment: derby-4869-14-ac-closeOnCompletion.diff
Attaching derby-4869-14-ac-closeOnCompletion.diff. This implements the new JDBC
4.1 methods Statement.closeOnCompletion() and Statement.isCloseOnCompletion().
I will run regression tests.
The patch takes advantage of the fact that the physical statements already keep
pointers to their open ResultSets. Both physical statements already have a
method which closes all of the dependent ResultSets before advancing to the
next operation which creates ResultSets. The new closeOnCompletion logic simply
follows the same roster of dependent objects. This might be brittle and worth
encapsulating in an object which explicitly tracks dependencies. Or, that
alternative approach might be seen as over-engineering the problem. I don't
have strong religion on this point and welcome your opinions.
I have written some basic regression tests for this functionality. The
following areas could use more testing:
1) Statements with generated keys.
2) Situations in which mere navigation implicitly closes ResultSets.
Touches the following files:
--------------
M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
Changes to the embedded physical statement.
--------------
M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
Changes to the wrapped embedded statement.
--------------
M java/client/org/apache/derby/client/am/Statement.java
M java/client/org/apache/derby/client/am/ResultSet.java
Changes to the network physical statement.
--------------
M java/client/org/apache/derby/client/am/LogicalStatementEntity.java
Changes to the wrapped network statement.
--------------
A
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper41Statement.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StatementJdbc20Test.java
Basic tests.
> Implement JDBC 4.1, the api increment introduced by Java 7
> ----------------------------------------------------------
>
> Key: DERBY-4869
> URL: https://issues.apache.org/jira/browse/DERBY-4869
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Reporter: Rick Hillegas
> Attachments: derby-4869-01-ac-rs-getObject.diff,
> derby-4869-01-ad-rs-getObject.diff, derby-4869-02-aa-cs-ps-addBatch.diff,
> derby-4869-02-ab-cs-ps-addBatch.diff,
> derby-4869-03-aa-rs-getObject-errorCleanup.diff,
> derby-4869-04-aa-rs-getObject-simplification.diff,
> derby-4869-05-aa-rs-getObject-exception.diff,
> derby-4869-06-aa-cs-getObject.diff, derby-4869-06-ab-cs-getObject.diff,
> derby-4869-07-aa-timedisplacement.diff, derby-4869-08-ac-nullHandling.diff,
> derby-4869-09-ac-abort.diff, derby-4869-10-aa-abortSecurityTest.diff,
> derby-4869-11-aa-abortHidePrivates.diff,
> derby-4869-12-aa-xaAndPooledAborts.diff,
> derby-4869-13-aa-xaAndPooledAbortsSecurityManager.diff,
> derby-4869-14-ac-closeOnCompletion.diff,
> derby-4869-exp-01-aa-noTryCatch.diff, disable-tests.diff,
> JDBC_4.1_Changes.html, timezone.diff
>
>
> This is a master issue logged to track our work implementing JDBC 4.1, the
> changes to the java.sql and javax.sql packages introduced by Java 7.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.