Monitor what threads are using connections from the DBCP pool, and waiting for connection. Generate a nice table to understand what is happening.
Usage:
- Replace your application's
commons-dbcp-1.4.jar
with commons-dbcp-1.4-monitored.jar (rename it to pretend it is really the same JAR file) - Run your application, making sure the output is directed to a log file
- When you want, generate a graph:
- Run:
./generate-dbcp-graph.sh <your-output-file.log>
- Wait while
dbcp-connected-by-thread.csv
anddbcp-waiting-by-thread.csv
are generated. - Open the CSV files with any spreadsheet program (like LibreOffice) and use conditional formatting to end up with the table below. To create the graph below, create a
SUM
column for each CSV and use your spreadsheet program's graphing feature.
- Run:
Compilation:
- Download the Commons DBCP 1.4 source code
- Uncompress it.
- Copy all files from the
patch-for-commons-dbcp-1.4-src
directory to into the uncompressed directory - Run Ant
This product includes software developed by The Apache Software Foundation (http://www.apache.org/).