"David Boyer" <boyedav@bvu.edu> wrote on Sat, 27 Dec 2003 18:04:49
-0600 in comp.lang.java.softwaretools:
>Hi all,
>
[quoted text clipped - 9 lines]
>The main distinction between this pooling system and the others I can find
>is that there's no need to pre-configure the pools or use JNDI.
I'm not sure what you mean by "pre-configure" the pools, but the
pooling library that's part of the Apache Commons project is pretty
simple. Here's a code snippet that creates a pooling
javax.sql.DataSource, and it doesn't require JNDI:
DriverConnectionFactory connFactory
= new DriverConnectionFactory(driver, url, propertiess);
GenericObjectPool genericPool = new GenericObjectPool(null,
maxConnections);
genericPool.setWhenExhaustedAction(genericPool.WHEN_EXHAUSTED_FAIL);
PoolableConnectionFactory
poolableConnectionFactory
= new PoolableConnectionFactory(connFactory,
genericPool,null, null, false, true);
PoolingDataSource dataSource
= new PoolingDataSource(genericPool);
return dataSource;

Signature
Check out QueryForm, a free, open source, Java/Swing-based
front end for relational databases.
http://qform.sourceforge.net