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

Connection leak when SQLException is thrown while enlisting in XA transaction

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Labels:
      None
    • Environment:

      All

      Description

      In ManagedConnection when delegate connection is null new real (driver) connection is borroved from pool. If SQLExcetion is thrown in 'TransactionContext.enlistResource()' that borrowed connection is lost (leaked).
      Short fail on network side may immediately exhaust the pool.

        Attachments

        1. DBCP-433_patch.diff
          2 kB
          Vladimir Konkov
        2. TestManagedConnection.java
          7 kB
          Thomas Neidhart

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vladimirfx Vladimir Konkov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: