Re: Connection pool stats

2010-03-15 Thread Dhiren Bhatia
Hi Mark, That won't work because Tomcat creates an instance of org.apache.tomcat.dbcp.dbcp.BasicDataSource which cannot be cast to org.apache.commons.dbcp.BasicDataSource. I need to keep the code generic (to run in other containers), so I can't use org.apache.tomcat.dbcp.dbcp.BasicDataSource in t

RE: Connection pool stats

2010-03-15 Thread Caldarale, Charles R
> From: Dhiren Bhatia [mailto:dhiren.for...@gmail.com] > Subject: Connection pool stats > > How do I get stats on the connection pool? I would like to check how > many connections are active/idle at any point in time. This may help: http://lambdaprobe.org/d/index.htm An example of its display fo

Re: Connection pool stats

2010-03-15 Thread Mark Shifman
You can cast your datasource object to be a BasicDataSource then the javadoc gives you all kinds of things you can get. like getNumActive(), getNumIdle() etc (for dbcp 1.3) http://commons.apache.org/dbcp/api-1.3/index.html Dhiren Bhatia wrote: > I've configured my DB connection pool as follows: