Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Currently JDBC driver is hard coded. Replace with class name from environment. If no driver name found, use default.

        Activity

        Hide
        zhangyongjiang Cheng added a comment -

        Introduced a new class DriverManagerUtil.

        DriverManagerUtil.loadDriver will look up driver name from system environment first. If found, use it. If not, use default.

        All old DriverManager.getConnection calls are replaced with DriverManagerUtil.getConnection.

        Show
        zhangyongjiang Cheng added a comment - Introduced a new class DriverManagerUtil. DriverManagerUtil.loadDriver will look up driver name from system environment first. If found, use it. If not, use default. All old DriverManager.getConnection calls are replaced with DriverManagerUtil.getConnection.
        Hide
        zhangyongjiang Cheng added a comment -

        Introduced a new class DriverManagerUtil.

        DriverManagerUtil.loadDriver will look up driver name from system environment first. If found, use it. If not, use default. We no longer force user to use mysql driver. It could be any driver or driver wrapper.

        All old DriverManager.getConnection calls are replaced with DriverManagerUtil.getConnection. If later we decided to use connection pool, we only need to change one place.

        Show
        zhangyongjiang Cheng added a comment - Introduced a new class DriverManagerUtil. DriverManagerUtil.loadDriver will look up driver name from system environment first. If found, use it. If not, use default. We no longer force user to use mysql driver. It could be any driver or driver wrapper. All old DriverManager.getConnection calls are replaced with DriverManagerUtil.getConnection. If later we decided to use connection pool, we only need to change one place.
        Hide
        eyang Eric Yang added a comment -

        +1 Looks good.

        Show
        eyang Eric Yang added a comment - +1 Looks good.
        Hide
        eyang Eric Yang added a comment -

        I just committed this, thanks Cheng.

        Show
        eyang Eric Yang added a comment - I just committed this, thanks Cheng.

          People

          • Assignee:
            zhangyongjiang Cheng
            Reporter:
            zhangyongjiang Cheng
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development