Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to retrieve what SQL(s) a java.sql.Connection is running ?

 
First Light
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've written a custom connection pooling package and I would like to display what each connection in the pool is currently running(Information on the session associated with this connection). I would like to display what SQL(s) this connection is running, how long has it been running and of course handles to those statements so that I can call statement.cancel() to stop them if needed. Some sort of java version of oracletool package which was written in perl.
I will appreciate if anybody can offer some suggestions and/or examples.
Thanks
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!