Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-322

CPDSConnectionFactory.validateObject(Object) ignores Throwable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2, 1.2.1, 1.2.2, 1.3, 1.4
    • 2.0
    • None

    Description

      CPDSConnectionFactory.validateObject(Object) catches and ignores Throwable, which is a bit excessive. For example:

      if (rset != null) {
          try {
              rset.close();
          } catch (Throwable t) {
              // ignore
          }
      }
      

      close() can only throw SQLException, and that is all that should be ignored. In particular, ThreadDeath should never be ignored.

      Same applies to KeyedCPDSConnectionFactory.

      Basic[Managed]Datasource also catch Throwable, but rethrow it as SQLNestedException.
      This is a bit better, but there's still the problem with ThreadDeath.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: