Derby
  1. Derby
  2. DERBY-5519

Update code in JVMInfo#derbyVMLevel to give correct results for Java 7 and provisionally for 8.

    Details

    • Issue & fix info:
      Known fix
    • Bug behavior facts:
      Deviation from standard

      Description

      The method derbyVMLevel gives correct result only up to and including Java 6, cf. this snippet:

      public static String derbyVMLevel()
      {
      switch (JDK_ID)

      { case J2SE_14: return J2ME ? "J2ME - JDBC for CDC/FP 1.1" : "J2SE 1.4 - JDBC 3.0"; case J2SE_142: return "J2SE 1.4.2 - JDBC 3.0"; case J2SE_15: return "J2SE 5.0 - JDBC 3.0"; case J2SE_16: return "Java SE 6 - JDBC 4.0"; default: return "?-?"; }

      }

      This is exposed through our MBean implementation in org.apache.derby.jdbc.JDBC#getDriverLevel

      1. derby-5519.diff
        0.9 kB
        Dag H. Wanvik

        Issue Links

          Activity

          Hide
          Dag H. Wanvik added a comment -

          Another thing is, what JDBC level should be reported above? It seems we should return JDBC 4.1, at least with Java 6 and 7.

          Show
          Dag H. Wanvik added a comment - Another thing is, what JDBC level should be reported above? It seems we should return JDBC 4.1, at least with Java 6 and 7.
          Hide
          Dag H. Wanvik added a comment -

          Attaching a patch for this issue. It returns JDBC 4.1 for both Java 6 and Java 7, as does database metadata.

          The test that would test derbyVMLevel, has a bug, cf DERBY-5521, for which I upload a separate patch. Please review these two in conjunction.

          Show
          Dag H. Wanvik added a comment - Attaching a patch for this issue. It returns JDBC 4.1 for both Java 6 and Java 7, as does database metadata. The test that would test derbyVMLevel, has a bug, cf DERBY-5521 , for which I upload a separate patch. Please review these two in conjunction.
          Hide
          Knut Anders Hatlen added a comment -

          It sounds reasonable to return the same JDBC version as DatabaseMetaData does. +1 to commit.

          Show
          Knut Anders Hatlen added a comment - It sounds reasonable to return the same JDBC version as DatabaseMetaData does. +1 to commit.
          Hide
          Dag H. Wanvik added a comment -

          Committed as svn 1211257.

          Show
          Dag H. Wanvik added a comment - Committed as svn 1211257.
          Hide
          Kathey Marsden added a comment -

          I was looking at backporting this to 10.8, but maybe 10.8 is correct. I seem to recall a discussion tha
          t 10.8 should not report JDBC 4.1 yet. Currently in 10.8 we have case J2SE_17: return "Java SE 7 - JDBC 4.0";
          Is that right?

          Thanks

          Kathey

          Show
          Kathey Marsden added a comment - I was looking at backporting this to 10.8, but maybe 10.8 is correct. I seem to recall a discussion tha t 10.8 should not report JDBC 4.1 yet. Currently in 10.8 we have case J2SE_17: return "Java SE 7 - JDBC 4.0"; Is that right? Thanks Kathey
          Hide
          Rick Hillegas added a comment -

          Hi Kathey,

          The current 10.8 behavior looks correct to me. There was a little more work needed in order to make Derby fully support JDBC 4.1. That work was done on the trunk under DERBY-5488. I would not change the 10.8 J2SE_17 case unless the work on DERBY-5488 is backported to 10.8 also. Thanks.

          Show
          Rick Hillegas added a comment - Hi Kathey, The current 10.8 behavior looks correct to me. There was a little more work needed in order to make Derby fully support JDBC 4.1. That work was done on the trunk under DERBY-5488 . I would not change the 10.8 J2SE_17 case unless the work on DERBY-5488 is backported to 10.8 also. Thanks.
          Hide
          Knut Anders Hatlen added a comment -

          [bulk update: close all resolved issues that haven't had any activity the last year]

          Show
          Knut Anders Hatlen added a comment - [bulk update: close all resolved issues that haven't had any activity the last year]

            People

            • Assignee:
              Dag H. Wanvik
              Reporter:
              Dag H. Wanvik
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development