title: How to Debug / Log Tomcat JDBC Connection Pool's connections?
body: <p>I  am using Tomcat JDBC connection pool along with Spring boot, JDBC template and SQL Server. I need to know what is going inside connection pool while application is waiting for database connection. Such as....</p>
  
  <ul>
  <li>No of active connections</li>
  <li>No of idle connections</li>
  <li>No of blocked connections, additional info why this connection is blocked</li>
  <li>No of available connections</li>
  <li>and ...</li>
  </ul>
  
  <p>Is there any way to get these info by debugging or using logging frameworks like log4j?</p>
  
  <p>Any idea will be appreciated.</p>