Re: Reg: Connection pool stats

2013-11-14 Thread Daniel Mikusa
On Nov 14, 2013, at 2:23 AM, Anu Prab wrote: > On Nov 11, 2013, at 12:59 AM, Anu Prab wrote: > >> On Nov 7, 2013, at 11:58 PM, Anu Prab wrote: >> > I am using Tomcat 7.0.42 and Tomcat jdbc pool. >>> Just to be perfectly clear, how are you using this? With a >>> tag in your Tomcat

Re: Reg: Connection pool stats

2013-11-13 Thread Anu Prab
On Nov 11, 2013, at 12:59 AM, Anu Prab wrote: > On Nov 7, 2013, at 11:58 PM, Anu Prab wrote: > I am using Tomcat 7.0.42 and Tomcat jdbc pool. >> >>> Just to be perfectly clear, how are you using this? With a >> tag in your Tomcat >configuration or are you creating the pool in your >> code

Re: Reg: Connection pool stats

2013-11-11 Thread Daniel Mikusa
On Nov 11, 2013, at 12:59 AM, Anu Prab wrote: > On Nov 7, 2013, at 11:58 PM, Anu Prab wrote: > I am using Tomcat 7.0.42 and Tomcat jdbc pool. >> >>> Just to be perfectly clear, how are you using this? With a >> tag in your Tomcat >configuration or are you creating the pool in your >> co

Re: Reg: Connection pool stats

2013-11-10 Thread Anu Prab
On Nov 7, 2013, at 11:58 PM, Anu Prab wrote: >>> I am using Tomcat 7.0.42 and Tomcat jdbc pool. > >> Just to be perfectly clear, how are you using this? With a > tag in your Tomcat >configuration or are you creating the pool in your > code? Either way, include the necessary >config or code whi

Re: Reg: Connection pool stats

2013-11-10 Thread Anu Prab
On Nov 7, 2013, at 11:58 PM, Anu Prab wrote: >>> I am using Tomcat 7.0.42 and Tomcat jdbc pool. > >> Just to be perfectly clear, how are you using this? With a > tag in your Tomcat >configuration or are you creating the pool in your > code? Either way, include the necessary >config or code whi

Re: Reg: Connection pool stats

2013-11-08 Thread Daniel Mikusa
On Nov 7, 2013, at 11:58 PM, Anu Prab wrote: >>> I am using Tomcat 7.0.42 and Tomcat jdbc pool. > >> Just to be perfectly clear, how are you using this? With a > tag in your Tomcat >configuration or are you creating the pool in your > code? Either way, include the necessary >config or code wh

Re: Reg: Connection pool stats

2013-11-07 Thread Anu Prab
>> I am using Tomcat 7.0.42 and Tomcat jdbc pool. >Just to be perfectly clear, how are you using this? With a tag in your Tomcat >configuration or are you creating the pool in your code? Either way, include the necessary >config or code which shows how you've defined the pool. The pool configu

Re: Reg: Connection pool stats

2013-11-07 Thread Daniel Mikusa
On Nov 7, 2013, at 2:07 AM, Anu Prab wrote: > Hi, > > I am using Tomcat 7.0.42 and Tomcat jdbc pool. Just to be perfectly clear, how are you using this? With a tag in your Tomcat configuration or are you creating the pool in your code? Either way, include the necessary config or code which

Reg: Connection pool stats

2013-11-06 Thread Anu Prab
Hi, I am using Tomcat 7.0.42 and Tomcat jdbc pool. Once the pool is created with the default configuration, I obtained few connections from this pool. But after certain amount of time, dataSource.getSize() shows the size as 0! Is this the expected behavior? Please help me understand what is happe

Reg: Connection pool stats

2013-11-06 Thread Anu Prab
Hi, I am using Tomcat 7.0.42 and Tomcat jdbc pool. Once the pool is created with the default configuration, I obtained few connections from this pool. But after certain amount of time, *dataSource.getSize*() shows the size as 0! Is this the expected behavior? Please help me understand what is hap

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

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:

Connection pool stats

2010-03-15 Thread Dhiren Bhatia
I've configured my DB connection pool as follows: context.xml web.xml DB Connection jdbc/myserver javax.sql.DataSource Container In my code, I use a javax.sql.DataSource object to get connections and call connection.close() to return connections. How do I get stats on the connecti