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/05/12 22:47:10 UTC

DO NOT REPLY [Bug 34902] New: - [pool] StackObjectPool.releaseObject(...) has silly behavior when the pool is full

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=34902>.
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=34902

           Summary: [pool] StackObjectPool.releaseObject(...) has silly
                    behavior when the pool is full
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: Sandy@McArthur.org


StackObjectPool which is a LIFO pool discards newer pool objects when you call
releaseObject(Object) on a full pool. Presumablly if you are using a
StackObjectPool it is because the most recently added object is the most likely
to be useful when you need another instance.

In the current behavior (1.2) the pool is checked to see if it is maxed out when
you try to release another object back into the pool (line 160). If it is the
recently released object is discarded. Odds are the older objects pushed on to
the pool stack are the most stale and lest useful but those are kept. This
creates a situation where older objects are kept around despite their inferiority.

-- 
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