commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14981] New: - StackObjectPool.returnObject() cannot be used to populate pool
Date Sun, 01 Dec 2002 15:22:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14981>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14981

StackObjectPool.returnObject()  cannot be used to populate pool

           Summary: StackObjectPool.returnObject()  cannot be used to
                    populate pool
           Product: Commons
           Version: 1.0.1 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: sschwell@yahoo.com


The description of the StackObjectPool constructors that allow null factory 
state that "Clients must first populate the pool using returnObject() before 
they can be borrowObject() borrowed".

returnObject() decrements _numActive and therefore cannot be used for initial 
population of the pool.

Also, using returnObject() for this purpose breaks the contract of this method 
as stated in the ObjectPool interface: "By contract, obj MUST have been 
obtained using borrowObject()". We need another method in the ObjectPool 
interface, addNewObject(), for this purpose.

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


Mime
View raw message