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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.5
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: