commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Raoul <nicolas.ro...@gmail.com>
Subject [dbcp] Just created an open-source tool to monitor which threads are using/waiting DBCP connections, seeking feedback
Date Mon, 06 Aug 2012 03:02:31 GMT
Hello all,

I am very new to DBCP, and I wanted to easily see what happens in a
graphical way, so I created this tool:

  https://github.com/nicolas-raoul/Commons-DBCP-monitoring

Basically it is a modified DBCP that increments/decrements 2 variables:
- Number of threads using a connection
- Number of threads waiting for a connection

I just output +1/-1 lines to the output at the strategic places below:
- Beginning of AbandonedObjectPool.borrowObject (waiting++)
- End of AbandonedObjectPool.borrowObject (used++, waiting--)
- Beginning of AbandonedObjectPool.returnObject (used--)
- Beginning of AbandonedObjectPool.invalidateObject (used--)

Did I forgot some places where connections are borrowed/returned?
Are there better places?

Thank you very much for any feedback!
Nicolas Raoul
http://nicolas-raoul.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message