db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6000) Implement support for JDBC 4.2
Date Mon, 04 Feb 2013 16:00:12 GMT

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

Rick Hillegas updated DERBY-6000:
---------------------------------

    Attachment: derby-6000-07-ab-batchUpdateException.diff

Attaching derby-6000-07-ab-batchUpdateException.diff. This patch adds support for the new
constructor and accessor method added by JDBC 4.2 to BatchUpdateException. I am running tests
now.

The build and the new tests seem to work on Java 7. In addition, I can build the new support
on Java 8. However, I can't test on Java 8 because of https://jbs.oracle.com/bugs/browse/JDK-8004967.
So this patch will have to be re-built and tested with Java 8 once https://jbs.oracle.com/bugs/browse/JDK-8004967
is fixed.

This patch makes Derby create BatchUpdateExceptions with the following new constructor when
running on Java 8. This is a constructor which treats the update counts as longs rather than
ints:

  public BatchUpdateException
   (
     java.lang.String reason, 
     java.lang.String SQLState,
     int vendorCode,
     long[] updateCounts,
     java.lang.Throwable cause
  )

In addition, this patch tests that the correct values are returned by the following new accessor
method which JDBC 4.2 added to BatchUpdateException:

  public long[] getLargeUpdateCounts()

This patch makes the following changes:

1) Simple change to the embedded driver.

2) For the client driver, the patch eliminates Derby's special subclass of BatchUpdateException.
Instead, the patch introduces a factory method which invokes the correct BatchUpdateException
depending on the VM level.

3) For the client driver, build changes were necessary in order to compile a ClientJDBCObjectFactory
for Java 8. This factory will be expanded as other JDBC 4.2 extensions are added.

4) Revamps the batch update tests to evaluate the new BatchUpdateException accessor method
when running on Java 8. Also adds a new test to verify BatchUpdateException behavior when
your batches generate very large update counts.


Touches the following files:

-------------

M       java/engine/org/apache/derby/impl/jdbc/Util.java

Changes for (1).

-------------

M       java/client/org/apache/derby/jdbc/ClientDriver.java
M       java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java
A       java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java
M       java/client/org/apache/derby/client/am/Statement.java
M       java/client/org/apache/derby/client/am/Configuration.java
M       java/client/org/apache/derby/client/am/PreparedStatement.java
D       java/client/org/apache/derby/client/am/BatchUpdateException.java
M       java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java
M       java/client/org/apache/derby/client/am/Agent.java

Changes for (2).

-------------

M       java/client/build.xml
M       build.xml
A       tools/jar/dnc.1.8.properties

Changes for (3).

-------------

M       java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
M       java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java
M       java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

Changes for (4).

                
> Implement support for JDBC 4.2
> ------------------------------
>
>                 Key: DERBY-6000
>                 URL: https://issues.apache.org/jira/browse/DERBY-6000
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>            Reporter: Rick Hillegas
>         Attachments: derby-6000-01-aa-executeLargeUpdateEmbedded.diff, derby-6000-02-ad-executeLargeUpdateClient.diff,
derby-6000-03-aa-executeLargeBatch.diff, derby-6000-04-aa-setLargeMaxRows.diff, derby-6000-05-aa-executeLargeUpdatePS.diff,
derby-6000-06-aa-DatabaseMetaData.diff, derby-6000-07-ab-batchUpdateException.diff, JDBC_4.2_Changes.html
>
>
> Open JDK 8 will include maintenance rev 4.2 of JDBC. The public discussion of JDBC 4.2
will take place here: http://openjdk.java.net/jeps/170. We will want to build Derby support
for JDBC 4.2 after a public spec appears. At this time, it is unclear what Derby release will
carry this support.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message