You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/09/09 22:14:42 UTC

DO NOT REPLY [Bug 36581] New: - GenericObjectPool Evictor should be a TimerTask, not a Thread

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36581>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36581

           Summary: GenericObjectPool Evictor should be a TimerTask, not a
                    Thread
           Product: Commons
           Version: 1.2 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: matt@thebishops.org


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org