Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-133

Failed object creation may result in invalid active count in GKOP

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Labels:
      None

      Description

      In GenericKeyedObjectPool.borrowObject() there are two instances of:

      try {
      _factory.destroyObject(key,pair.value);
      synchronized (this)

      { pool.decrementActiveCount(); }

      } catch (Exception e2)

      { // swallowed }

      The decrementing of the active count should be moved to a finally block to ensure that it is always called even if destroyObject() throws an exception.

      I think this is what DCP-34 is getting at.

        Attachments

          Activity

            People

            • Assignee:
              markt Mark Thomas
              Reporter:
              markt Mark Thomas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: