db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Bradbury (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2488) When loaded by jvm1.6 - Derby JDBC 3.0 driver returns 4 for JDBC driver major
Date Wed, 28 Mar 2007 22:16:25 GMT

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

Stan Bradbury commented on DERBY-2488:

Thanks, Dan, for the information.  I realized the results of this test could be interpreted
two ways and it looks like I recorded the wrong interpretation.  Unless you or someone corrects
me (I am still confused on the subject) I will change the description of this issue to be:

When loaded by jvm1.6, the jdbc.EmbeddedConnectionPoolDataSource does not support registering
a JDBC 4.0 Statement Event Listener.

The documentation, however, seems to say there are two versions, so I will also file documentation
sub-tasks related to this once I am sure I understand this correctly. Below are a few of the
statements that lead me to believe there was a version 3.0 and 4.0 datasource.  
...If I now understand correctly people should always reference EmbeddedConnectionPoolDataSource
and there is no need to reference EmbeddedConnectionPoolDataSource40 (except as a workaround
to a bug like this one) .
 >> Is this correct?

Documentation talking about different implementations/variants of the datasources:
 EmbeddedConnectionPoolDataSource40 supports the JDBC 4.0 specification for the J2SE 6.0 Java
Virtual Machine environment. Use EmbeddedConnectionPoolDataSource if your application runs
in the following environments:

    * JDBC 3.0 - Java 2 - JDK 1.4, J2SE 5.0
    * JDBC 2.0 - Java 2 - JDK 1.2,1.3 

Developers Guide:
Each of these DataSources has two variants. Use the first variant if your application run
on JDK 1.5 or lower. Use the second variant (the one whose class name ends with "40")
if your application runs on JDK 1.6 or higher.
• org.apache.derby.jdbc.EmbeddedDataSource and
org.apache.derby.jdbc.EmbeddedDataSource40    ....

> When loaded by jvm1.6 - Derby JDBC 3.0 driver returns 4 for JDBC driver major 
> ------------------------------------------------------------------------------
>                 Key: DERBY-2488
>                 URL: https://issues.apache.org/jira/browse/DERBY-2488
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>         Environment: Run test using JVM 1.6
>            Reporter: Stan Bradbury
>         Attachments: showJDBCdsMetaDataLis.class, showJDBCdsMetaDataLis.class, showJDBCdsMetaDataLis.java,
> When loaded using JVM 1.6 the JDBC 3.0 data source (org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource)
is reporting a JDBC spec compliance level of 4.  The DatabaseMetaData.getJDBCMajorVersion
method should return the
> correct spec compliance level (3) for the JDBC 3.0 data source.  The application server
that relies on the reported spec compliance level to determine if a statement event listener
should be registered will encounter a failure when  attemptting to register  an event listener
with the JDBC 3.0 driver.
> Note that the JDBC 4.0 metadata call ..getMetaData().supportsStoredFunctionsUsingCallSyntax()
is executed by the JDBC 3.0 driver.  This doesn't bother me but seems curious that this is
supported by a JDBC 3.0 driver.
> Attached is a test case based on the test code from DERBY-8862 (JDBC 4 driver reports
incorrect spec complieance level).
> Running the test:
> set JAVA_HOME to a 1.6 JVM
> Compile program
> run command:   ${JAVA_HOME}/java showJDBCdsMetaDataLis <path-to-database> 3.0 
> Using JAVA 6.0
> > "%JAVA_HOME%\bin\java" showJDBCdsMetaDataLis "c:\tstdb102" 3.0
>  . . JDBC 3 or less: Using jdbc.EmbeddedConnectionPoolDataSource
> Database product: Apache Derby
> Database version: - (485682)
> Driver name:      Apache Derby Embedded JDBC Driver
> Driver version: - (485682)
> JDBC driver major version: 4
> JDBC driver minor version: 0
> JDBC 4.0 metaData - SFusingCall: true
>  >> exception thrown:
> A non SQL error occured.
> java.lang.AbstractMethodError: org.apache.derby.jdbc.EmbedPooledConnection.addStatementEventListener(Ljavax/sql/Statemen
> tEventListener;)V
>         at showJDBCdsMetaDataLis.main(showJDBCdsMetaDataLis.java:103)

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

View raw message