commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: POOL - Question about different time out for borrow and add object
Date Wed, 29 Apr 2015 18:19:45 GMT
On 4/29/15 8:59 AM, vijay wrote:
> Hi ,
>
> I want to know if i can achieve this. Is there any way to specify time out
> for the addobject and borrow object methods?
>
> What i am really looking is when i start the pool i am prefilling it with
> add object for this i can wait for more time to geth the pool initialized.
> The backned system i have takes more time to crate connections
>
> But at the time of borrow i cannot have the client wait for long time if no
> idle connection is available and the factory make object method might take
> more time to  return object.
>
> So is there anyway i can tall factory method to wait for x time for add
> obkject and y time for borrow object calls

There is no timeout for addObject.  It is just a no-op if there is
no capacity to add to the pool when you call it.  If you are
prefilling at startup, that should not be a problem.  If you
actually *want* a timeout for the adds, then you need to implement
it in your factory itself.

Phil
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message