Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-503

Documentation should recommend using .newInstance() to instantiate JDBC driver

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.1.1.0
    • Fix Version/s: 10.5.1.1
    • Component/s: Documentation
    • Labels:
      None

      Description

      Using Class.forName("<driver name>").newInstance() is the recommended way to load and instantiate the JDBC driver, but the documentation does not contain the .newInstance() part.

      Pointers:

      http://db.apache.org/derby/docs/10.1/devguide/cdevdvlp40653.html
      http://db.apache.org/derby/docs/10.1/ref/rrefjdbc32052.html

      The EmbeddedDriver javadoc mentions it:

      "The JDBC specification recommends the Class.ForName method without the .newInstance() method call, but adding the newInstance() guarantees that Derby will be booted on any Java Virtual Machine."

        Attachments

        1. DERBY-503.diff
          19 kB
          Camilla Haase
        2. DERBY-503.stat
          0.4 kB
          Camilla Haase
        3. DERBY-503.zip
          23 kB
          Camilla Haase
        4. DERBY-503-2.diff
          19 kB
          Camilla Haase
        5. DERBY-503-2.zip
          23 kB
          Camilla Haase

          Issue Links

            Activity

              People

              • Assignee:
                chaase3 Camilla Haase
                Reporter:
                bakksjo Oyvind Bakksjo
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: