• Post Reply Bookmark Topic Watch Topic
  • New Topic

Method Calls  RSS feed

 
Peter Loew
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I am debugging some nasty code that has many (many) db connections opening and closing all over the place. I need to comment on when they open and close to make sure there aren't any connections being left open. Every time a connection is released it calls one method to do all the work.

My question is: Is there a way to programmatically tell (println) what method is calling this "one method" mentioned above so I could just debug that one method and not every instance of its callers?

Thanks,

Peter
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just create an exception in that metod and examine stack trace, should be easy! Have a look at -
http://java.sun.com/developer/qow/archive/104/index.html

HTH,
- Manish
 
Peter Loew
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, with a little fiddling that seems to have done the trick!

Peter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!