Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connection not closed

 
senthil kumar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there some tool to find out the code where the connection is not closed properly? I am getting connection issues and have huge applicaation where I cannot look into each and every program to find whether the connection is closed.any advice will be highly appreciated. thanks
 
Santhosh Reddy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
instead of checking the closing of connection,make your that the code which deals with the connection , is kept in try block and in the finally block close the connections,especially check the transction part , whether you have ended the transaction or not.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A have solved this kind of problem with a single class which handles the connection with the database and also closes the connection. This class is tested and I know for sure that the resultset and the needed connection is closed.

If you've a huge application it's important to have a good design in which you have a separation of concern.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic