Commons Dbcp
  1. Commons Dbcp
  2. DBCP-108

DriverManagerConnectionFactory: blank username/password handling

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      Mail from Maxwell Grender-Jones (on commons-dev 24 june 2004)
      -------------------------------------------------------------
      If you supply a username but not a password, or a password but not a
      username, dbcp ignores these values, and simply uses the URL to connect
      to your database (even when defaults exist for the null values). This
      means if I create a DriverManagerConnectionFactory with url, user and
      pass of mydburl, myusername, null, it will try connect to mydburl using
      default username and default password rather than myusername and default
      password.

      The solution:
      Allow the default username and password values to be used when one is
      present but the other is not, as provided by the patch. Now I realise
      default usernames/passwords are not ideal, but at the same time there's
      no need to prevent this functionality from working (imho).

        Activity

        Hide
        Dirk Verbeeck added a comment -

        Patch applied

        DriverManagerConnectionFactory.java Revision : 1.9 Date : 2004/6/24 18:32:53

        Show
        Dirk Verbeeck added a comment - Patch applied DriverManagerConnectionFactory.java Revision : 1.9 Date : 2004/6/24 18:32:53
        Hide
        Dirk Verbeeck added a comment -

        Created an attachment (id=11943)
        patch from Maxwell Grender-Jones

        Show
        Dirk Verbeeck added a comment - Created an attachment (id=11943) patch from Maxwell Grender-Jones

          People

          • Assignee:
            Unassigned
            Reporter:
            Dirk Verbeeck
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development