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] Commented: (POOL-117) StackObjectPool, SoftReferenceObjectPool borrowObject can loop indefinitely when new instances fail validation
Date Wed, 19 Dec 2007 23:29:43 GMT

    [ https://issues.apache.org/jira/browse/POOL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553531
] 

Phil Steitz commented on POOL-117:
----------------------------------

Fixed in 1.4 release branch in r605736 by modifying borrowObject to throw NoSuchElementException
when activate or validate fails on newly created instances (consistent with GenericObjectPool)

> StackObjectPool, SoftReferenceObjectPool borrowObject can loop indefinitely when new
instances fail validation
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: POOL-117
>                 URL: https://issues.apache.org/jira/browse/POOL-117
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Phil Steitz
>            Priority: Minor
>             Fix For: 1.4
>
>
> The borrowObject methods in StackObjectPool, SoftReferenceObjectPool are synchronized
and do not bound the number of attempts to create a valid instance when the pool is exhausted.
 When a new instance is created, if activation or validation fails, the code continues (without
bound) to retry the make-activate-validate sequence.  This can lead to an infinite loop if
the factory is unable to create valid instances.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message