On Tue, 15 Oct 2002 [EMAIL PROTECTED] wrote:

> Date: Tue, 15 Oct 2002 14:51:33 +0100 (BST)
> From: [EMAIL PROTECTED]
> Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [Pool] minimum pool size
>
> Afternoon chaps!
>
> I have just started to play with the pooling library to create a pool
> (strangley enough) of connections to our acounting package. This is
> using the Java to COM bridge and creating objects in this takes forever,
> hence the need for a pool.
>
> The problem I have is that the creation of my objects that I pool takes
> a long time, and I'd like to create them in advance of their use.
> However, I can't find anything like a minimum number in the pool (as
> there is with the maximum value) Therefore, the first time that an
> object is requested it still has to be created.
>
> Any help is much apreciated. I've tried to look through the archives,
> without any success!
>

This workaround sounds so simple that there must be something wrong with
it :-), but how about this:  in the startup logic of your application,
just create a loop that requests the appropriate number of instances of
your connection object (without returning them), followed by returning
them all.  That way, the pool will have the preconfigured instances
available by the time your application actually starts using them.

> regards
> IV
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to