Tomcat has a database connection pool (DBCP) for faster query execution.
In my application, too many connections have been used for too long, I suspect a leak (the connection does not close properly), and I need to find out where the leak is.
QUESTION: How do I find out the name of each thread using a connection?
It is advisable to live a JMX MBean, but other tips are also welcome. Displaying each trace of the thread stack or class name would be acceptable.
Note. I am not looking for an MBean that shows DBCP settings. I want to see what each connection uses.
source share