Re: New Object Pooling project
From: Dave Glasser (dglasser_at_pobox.com)
Date: 01/03/04
- Previous message: DMc: "Re: retrieve multiple dadx from db2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 03 Jan 2004 17:22:08 -0500
"David Boyer" <boyedav@bvu.edu> wrote on Sat, 27 Dec 2003 18:04:49
-0600 in comp.lang.java.softwaretools:
>Hi all,
>
>I've released a beta of my Object Pooling software and it's freely available
>on my web site:
>
>http://web.bvu.edu/staff/david/pooling/
>
>This is an extensible Object Pooling system that could be extendend to
>handle pooling of just about any Object type. The initial release contains a
>full database connection pooling system.
>
>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;
-- Check out QueryForm, a free, open source, Java/Swing-based front end for relational databases. http://qform.sourceforge.net
- Previous message: DMc: "Re: retrieve multiple dadx from db2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|