commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob" <unknown-ri...@earthlink.net>
Subject Question on using commons classes for connection pooling
Date Thu, 18 Mar 2004 23:16:38 GMT

Hi All,

I'm using the commons connection pooling classes for connection pooling for
a web site I'm working on.  I don't have apache/tomcat as the web server yet
( sorry - converting soon! )  - for now I'm using Sun One, but I'm using the
connection pool example from the apache web site

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/dbcp/doc/Manual
PoolingDriverExample.java

I've got it connecting to MySQL fine, but I can't figure out how to set the
minimum and maximum connections?  Also, when I get connection pool info

        ObjectPool connectionPool = driver.getPool("example");

I'm reminded that the getPool method is deprecated.  How do I get the pool
to look at it?

Also, being a total newbie to open source projects, is this the best forum
for these questions?

Any help would be appreciated!  below is the classes that are imported (from
the link above) that reference the classes used in the connection pool.

import org.apache.commons.pool.ObjectPool;
import org.apache.commons.pool.impl.GenericObjectPool;
import org.apache.commons.dbcp.ConnectionFactory;
import org.apache.commons.dbcp.PoolingDriver;
import org.apache.commons.dbcp.PoolableConnectionFactory;
import org.apache.commons.dbcp.DriverManagerConnectionFactory;

Thanks!

Rob


Mime
View raw message