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

[pool] GenericObjectPool is a LIFO, not a FIFO implementation

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    • 33264

    Description

      Hi,

      the GenericObjectPool implementation is (like the StackedObjectPool) a LIFO, not
      a FIFO implementation as stated here:
      http://jakarta.apache.org/commons/pool/guide/index.html).

      When borrowObject() is called, the first available object is extracted from the
      pool using removeFirst(). When returnObject(obj) is called, the object is
      returned to the pool using addFirst(). I would expect that addLast() is used if
      this is supposed to be a FIFO implementation.

      But perhaps the developers guide is wrong, not the implementation.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            thomas@schuerger.com Thomas Schürger
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment