You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2007/12/20 00:29:43 UTC
[jira] Commented: (POOL-117) StackObjectPool,
SoftReferenceObjectPool borrowObject can loop indefinitely when new
instances fail validation
[ 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.