commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandy McArthur (JIRA)" <>
Subject [jira] Commented: (POOL-94) GenericObjectPool allows checking in of previously checked in objects
Date Thu, 21 Dec 2006 01:26:22 GMT
    [ ] 
Sandy McArthur commented on POOL-94:

I should have said that returning an object more than once per borrow is considered broken
use of a pool. Your code shouldn't be using a borrowed object after it has been returned.

> GenericObjectPool allows checking in of previously checked in objects
> ---------------------------------------------------------------------
>                 Key: POOL-94
>                 URL:
>             Project: Commons Pool
>          Issue Type: New Feature
>    Affects Versions: 1.3
>         Environment: JDK 1.4.2, web application running under Tomcat 5.0.25
>            Reporter: Tim McCollough
>            Priority: Minor
> I am using GenericObjectPool to store a pool of socket connections. While debugging the
application I noticed that the result of GetNumActive() was becoming more and more negative,
while the GetNumIldle() count was ever increasing. Further debug showed that my application
was returning the same connection more than once and the GenericObjectPool implementation
accepted the return silently and decremented the active count and incremented the idle count.
> I don't object to GenericObjectPool allowing multiple returns on the same object, but
the bookkeeping problem will lead to bad things happening in the pool management code.
> I am investigating what it would take to fix GenericObjectPool but since I am inexperienced
in these commons projects I don't know what I should do from here.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message