Use the Statistics class. For example: ... configure a BoneCP connectionPool object
Statistics stats = connectionPool.getStatistics() (previously getStats but later renamed)
return
"Tot Conn Created: " + stats.getTotalCreatedConnections() +
"Tot Free Conn: " + stats.getTotalFree() +
"Tot Leased Conn: " + stats.getTotalLeased();
source
share