commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob" <>
Subject RE: Question on using commons classes for connection pooling
Date Sat, 20 Mar 2004 15:50:16 GMT

Hi Dirk,

Thanks!  That helps - in fact it's working great.  Is it possible to set the
pool on the fly?  When I try to get the configurable connectionPool object
like so ...

	GenericObjectPool connectionPool = driver.getPool("3gs-user-pool");

I get

	java:151: incompatible types

Even if I don't configure it on they fly, I'd like to get more information
on the pool statistics.

This has been very helpful, but the way.  Do you mind if I ask if you work
for apache, or are you with an independant company and you just monitory the
email list?  It's really great to have this resource.  I thought I might
even answer a question for someone else but several people had already done



-----Original Message-----
From: Dirk Verbeeck []
Sent: Friday, March 19, 2004 1:24 PM
To: Jakarta Commons Users List
Subject: Re: Question on using commons classes for connection pooling

Hi Rob
see comments inline

Rob wrote:
> Hi All,
> I'm using the commons connection pooling classes for connection pooling
> a web site I'm working on.  I don't have apache/tomcat as the web server
> ( sorry - converting soon! )  - for now I'm using Sun One, but I'm using
> connection pool example from the apache web site
> I've got it connecting to MySQL fine, but I can't figure out how to set
> 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);

See the GenericObjectPool for more info:

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
In the nightly builds of DBCP you can use the getConnectionPool method.

> 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:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message