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

[dbcp] Invalidate "broken" connections by monitoring SQLExceptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.1
    • None
    • None
    • Operating System: All
      Platform: All

    • 26759

    Description

      A PoolableConnection can know when it is "broken". (When a fatal SQLException is
      thrown.) A SQLException is considered fatal when it includes an error code from
      a configurable list of broken connection indicators.

      The attached patch is a partial implementation for review
      (not all Delegating* methods are covered)

      Summary:
      Add a list of indicators that (when found in an SQLException) mark a Connection
      as "broken". Broken Connections will be destroyed and not returned to the pool.

      if (!isBroken()) {
      _pool.returnObject(this);
      } else {
      _pool.invalidateObject(this);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            dirkv Dirk Verbeeck
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: