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] Commented: (DERBY-4869) Implement JDBC 4.1, the api increment introduced by Java 7
Date Wed, 16 Feb 2011 14:20:59 GMT

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

Rick Hillegas commented on DERBY-4869:
--------------------------------------

Hi Kathey,

Those are good questions. Before answering them, let me first list a couple facts:

1) The AutoloadedDriver is the embedded driver which is registered with the DriverManager.
When it was introduced, it is what was registered with DriverManager regardless of what VM
you were using. It was used for JDK 1.4 on up.

2) The new getParentLogger() method raises a SQLFeatureNotSupportedException. This exception
was introduced in Java 6. A method which raises this exception can't be compiled on Java 5
or lower.

3) As part of satisfying the JDBC 4.1 contract, when running on Java 7 or higher, the new
getParentLogger() method must be found in the driver returned by DriverManager.getDriver(
"jdbc:derby" ).

Two options occurred:

i) Put getParentLogger() in AutoloadedDriver but don't raise SQLFeatureNotSupportedException.
This would mean actually implementing the Logger idiom for writing error messages and diagnostics.
I have created DERBY-5007 to track this enhancement. It is an attractive feature but it is
a mini-project and not part of JDBC 4.1. If we do get around to implementing DERBY-5007, then
getParentLogger() will no longer have to raise SQLFeatureNotSupportedException. We can then
move it down to AutoloadedDriver and remove the AutoloadedDriver40 class.

ii) The other option was to add a new AutoloadedDriver subclass to hold the new getParentLogger()
method. This is the option I chose. The new subclass is called AutoloadedDriver40 because
it is used if you are running on Java 6 on up (that is at JDBC level 4.0 or greater). This
follows the general pattern of our JDBC implementation: When a new rev of the JDBC spec adds
a method which COULD run on older VMs, we try to put the new method in the lowest level driver
for which it can be compiled. You will notice that a great deal of our JDBC 3 and JDBC 4 functionality
was actually pushed down into our JDBC 2 drivers.

I hope this makes sense. Please ask more questions if it doesn't.

Thanks,
-Rick

> 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
>            Assignee: Rick Hillegas
>         Attachments: Drv41.java, JDBC_4.1_Changes.html, 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-15-aa-autoGenKeys.diff, derby-4869-16-aa-clarifyStatementSpec.diff, derby-4869-17-aa-statementTimeoutException.diff,
derby-4869-18-aa-getSetSchema.diff, derby-4869-19-aa-getSetNetworkTimeout.diff, derby-4869-20-aa-setSchemaFastPath.diff,
derby-4869-21-aa-implicitlyClosedResultSets.diff, derby-4869-21-ab-implicitlyClosedResultSets.diff,
derby-4869-22-aa-unstableStatementTest.diff, derby-4869-23-aa-dbmd.diff, derby-4869-24-ab-getParentLogger.diff,
derby-4869-25-aa-removeClosureCheck.diff, derby-4869-26-aa-signatureTests.diff, derby-4869-27-aa-driver40.diff,
derby-4869-28-ab-autoloadExceptionFactory.diff, derby-4869-29-aa-fixAutoloadTest.diff, derby-4869-30-aa-unstableStatementTest.diff,
derby-4869-31-aa-unstableStatementTest.diff, derby-4869-31-ab-unstableStatementTest.diff,
derby-4869-exp-01-aa-noTryCatch.diff, disable-tests.diff, 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message