Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-6009

Remove use of Class.forName() to load db drivers

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: Could
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: Core 2.5.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      In various places in the platform, we have calls to Class.forName() to ensure the appropriate JDBC driver is loaded. This has been completely unnecessary since Java 6 / JDBC 4 when JDBC drivers are actually loaded using the Java Service Provider mechanism to load any JDBC drivers on the classpath. By itself, this isn't harmful, but it creates a maintenance headache needing to track the various driver versions and, with some configurations, leads to us still trying to load the (deprecated) com.mysql.jdbc.Driver implementation, which is likely to go away at some point in the future.

      So, the purpose of this ticket is just to remove the unnecessary Class.forName() calls and let everything be handled for us.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              ibacher Ian Bacher
              Reporter:
              ibacher Ian Bacher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: