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-321) ObjectPool.addObject limiting us to add an object with parameter
Date Sun, 06 Oct 2019 00:06:00 GMT

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

Phil Steitz commented on POOL-321:
----------------------------------

The problem with this is that the parameter needs to be passed to the factory and the pool
would have to know about the signature or use some type-weak method of passing parameters
via JSON or somesuch.  How about adding an addObject(T) that takes an instance of the class
of objects under management?  Client code can then extend the factory to create instances
with whatever parameters are desired and then use this method to get them added to the pool.

> ObjectPool.addObject limiting us to add an object with parameter
> ----------------------------------------------------------------
>
>                 Key: POOL-321
>                 URL: https://issues.apache.org/jira/browse/POOL-321
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.4
>            Reporter: Ugur Bayram
>            Priority: Major
>             Fix For: 2.7.1
>
>
> In current implementation we are not able to add an object with parameter to the pool.
addObject does not take any parameter
> Consider of a user pool where the content of each user might differ. In such cases, current
implementation have limitation. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message