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

Improvement of error recovery in KeyedCPDSConnectionFactory

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:

      Windows XP, Java 1.5.0_06-b05, Sybase ASE 12.5.4, jConnect 6.0.5 EBF 13862, Commons Pool 1.3

      Description

      Attached you'll find a patch that improves the recovery of the class in different error situations.

      1. The addition of removeConnectionEventListener() in destroyObject() ensures that the listener is removed, which is not guaranteed to have happened upon call of destroyObject(). We are for sure not interested any more in events, since we are about to destroy.

      2. The same addition is made to connectionClosed(). Additionally, we have substituted there the call to destroyObject() with a call to pool.invalidateObject(). This is necessary because otherwise the object is destroyed but not removed from the pool.

      3. The same substitution is made in connectionErrorOccurred(), otherwise the object might remain in the pool.

        Attachments

          Activity

            People

            • Assignee:
              psteitz Phil Steitz
              Reporter:
              marsangr Marcos Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: