What is the best strategy to determine that the DBMS is up and that the Connections from my pool are still viable before handing them out?
Location: http://www.jguru.com/faq/view.jsp?EID=391331 Created: Mar 30, 2001 Modified: 2002-03-23 22:34:15.73 Author: Joe Sam Shirah (http://www.jguru.com/guru/viewbio.jsp?EID=42100) Question originally posed by Rakesh Sahu (http://www.jguru.com/guru/viewbio.jsp?EID=127108 There were a number of responses to this question. I am including a distillation of these plus some additional information to consider. It should be obvious that: A) Some statement that requires a database engine response must be executed. B) That any interaction with the DBMS engine will take some time and therefore slow down application responsiveness. C) That the validity of the Connection can only be guaranteed as of the time of the last check, meaning that the class using the method must still check for exceptions. With these in mind, my own conclusions are that the application should handle any problems with invalid Connections using a standard exception handler for this case and that connection pools should ha