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

DIH JdbcDataSource exception handling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3, 6.0
    • 4.4
    • 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

            shalin Shalin Shekhar Mangar
            chris.eldredge Chris Eldredge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: