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

[pool] Potential pool leak if _factory.makeObject() throws a Throwable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.3
    • None
    • Operating System: All
      Platform: All

    • 34296

    Description

      The following code in GenericObjectPool.borrowObject is causing a
      pool "leaking" in our system, when factory.makeObject throws a Throwable in the
      following piece of code:

      if(null == pair) {
      try

      { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; }

      catch (Exception e) {
      // object cannot be created
      synchronized(this)

      { _numActive--; notifyAll(); }

      throw e;
      }
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            dkrylovv@newmail.ru Denis Krylov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: