commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (POOL-263) GenericObjectPool close and returnObject is not synchronized
Date Wed, 31 Dec 2014 16:19:13 GMT

     [ https://issues.apache.org/jira/browse/POOL-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Phil Steitz closed POOL-263.
----------------------------

> GenericObjectPool close and returnObject is not synchronized
> ------------------------------------------------------------
>
>                 Key: POOL-263
>                 URL: https://issues.apache.org/jira/browse/POOL-263
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: ALL
>            Reporter: yangxuesong
>             Fix For: 2.3
>
>
> the javadoc on GenericObjectPool#close() says:
> "Closes the pool. Once the pool is closed, borrowObject() will fail with IllegalStateException,
but returnObject(Object) and invalidateObject(Object) will continue to work, with returned
objects destroyed on return.
> Destroys idle instances in the pool by invoking clear()."
> Thread1: pool.close()
> Thread2: pool.returnObject()
> since close and returnObject is not synchronized, there is a small chance that an returned
object is not destoryed after the pool is closed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message