Hi Rob
see comments inline

Rob wrote:
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?

You set it on the connectionPool but you have to use the concrete implementation. In the example:


GenericObjectPool connectionPool = new GenericObjectPool(null);
connectionPool.setMaxActive(maximum);

See the GenericObjectPool for more info: http://jakarta.apache.org/commons/pool/apidocs/org/apache/commons/pool/impl/GenericObjectPool.html

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?

In DBCP v1.1 you the only way is to use the deprecated method.
(it will not be removed any time soon but be careful it throws RuntimeExceptions)
In the nightly builds of DBCP you can use the getConnectionPool method.
http://issues.apache.org/bugzilla/show_bug.cgi?id=25067


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

Yes, the user mailing list is created for these questions/answers.


-- Dirk



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



Reply via email to