title: How to track/log connections in tomcat dbcp pool and detect code that does not return connection to the pool
body: <p>Somewhere in a large application, there is some piece of code that does not return a connection to the connection pool as it should. The result is that that the pool reaches quickly the maximum connections.</p>
  
  <p>This can be worked around by setting it to remove abandoned connections, but it reduces performance.</p>
  
  <p>How can I enable logging in tomcat dbcp to show when connections are borrowed and returned?</p>