Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-7998

Enhance JDBC Driver to not require class specification

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 1.2.0
    • JDBC
    • None
    • Applications no longer need to explicitly load JDBC drivers using Class.forName()

    Description

      The hotspot VM offers a way to avoid having to specify the driver class explicitly when using the JDBC driver.

      The DriverManager methods getConnection and getDrivers have been enhanced to support the Java Standard Edition Service Provider mechanism. JDBC 4.0 Drivers must include the file META-INF/services/java.sql.Driver. This file contains the name of the JDBC drivers implementation of java.sql.Driver. For example, to load the my.sql.Driver class, the META-INF/services/java.sql.Driver file would contain the entry: `my.sql.Driver`

      Applications no longer need to explicitly load JDBC drivers using Class.forName(). Existing programs which currently load JDBC drivers using Class.forName() will continue to work without modification.

      via http://docs.oracle.com/javase/7/docs/api/java/sql/DriverManager.html

      Attachments

        1. HIVE-7998.1.patch
          0.7 kB
          Alexander Pivovarov

        Activity

          People

            apivovarov Alexander Pivovarov
            prateekrungta Prateek Rungta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: