Chamila Adhikarinayake
Chamila Adhikarinayake

Reputation: 3758

Understanding Connection pool with JMX related properties

I am analyzing JMX mbean (org.apache.tomcat.jdbc.pool.jmx.ConnectionPool) properties for my jdbc datasource related properties and I needed some reference on what these properties means. I couldn't find any documentation on what these methods give. I Checked https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.html#getActive() and couldn't find any info.

getActive()
getIdle()
getSize()
getWaitCount()

Is these have any connection with Tomcat JDBC Connection Pool properties mentioned in https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html? what is the relationship between Active Idle and Size (seems like Active + Idle = Size).

Thanks a lot

Upvotes: 1

Views: 2244

Answers (1)

Svetlin Zarev
Svetlin Zarev

Reputation: 15673

The methods on that MBean just delegate directly to the pool implementation:

  • getActive(): number of established connections that are being used by the application
  • getIdle(): number of established connections not being used
  • getSize(): number of established connections to the database
  • getWaitCount(): number of threads waiting for a connection

Upvotes: 2

Related Questions