Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4920

DIH JdbcDataSource exception handling

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3, 6.0
    • Fix Version/s: 4.4
    • Labels:
      None

      Description

      JdbcDataSource will incorrectly suppress exceptions when retrieving a connection from a JNDI context and fall back to trying to use DriverManager to obtain a connection. This makes it impossible to troubleshoot misconfigured JNDI DataSource.

      Additionally, when a SQLException is thrown while initializing a connection, such as in setAutoCommit(), the connection will not be closed. This can cause a resource leak.

      A patch will be attached with unit tests that addresses both issues.

        Attachments

        1. patch.diff
          10 kB
          Chris Eldredge

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              chris.eldredge Chris Eldredge
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: