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

[pool] GenericObjectPool Evictor should be a TimerTask, not a Thread

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2
    • 1.3
    • None
    • Operating System: All
      Platform: All

    • 36581

    Description

      Under most circumstances, an application will have one or two object pools, so
      creating a new Evictor thread for each object is fine.

      However, in the case of DBCP's PerUserDataSource class, this design is
      unacceptable as it creates a thread for every distinct user that uses the data
      source. In my case, our system has several thousand concurrent users, and as a
      result, the system was attempting to create several thousand Evictor threads.

      We fixed this by changing the Evictor from a Thread to a TimerTask which is
      scheduled with the Timer class.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--Timer.patch
          3 kB
          Matt Bishop
        2. ASF.LICENSE.NOT.GRANTED--GenericObjectPools-TimerTask.patch
          12 kB
          Sandy McArthur (from Bugzilla import)

        Activity

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

          People

            Unassigned Unassigned
            matt@thebishops.org Matt Bishop
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment