commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodney Waldhoff <rwaldh...@apache.org>
Subject Re: [dbcp] Minimum Number of Connections Open
Date Wed, 30 Jul 2003 00:02:17 GMT
No, not currently.

You can open a number of connections on application startup like this:

Connection[] conns = new Connection[SIZE];
for(int i=0;i<conns.length;i++) {
  conns[i] = DriverManager.getConnection(uri);
}
for(int i=0;i<conns.length;i++) {
  conns[i].close();
}

but depending upon your configuration, the pool may close all of those
connections if they sit idle long enough.

- Rod <http://radio.weblogs.com/0122027/>

On Fri, 25 Jul 2003, Botelho, Mauro wrote:

> I'm starting to use dbcp, and would like to know if there's a way to keep a minimum number
of connections open.
>
> Mauro
>

Mime
View raw message