title: How to monitor database connection in java?
body: <p>i have created web application using java. In that i am using tomcat server and SQL server. I need to implement watch dog service for monitoring database connection and server connection. I mean if database is not connecting or tomcat server is down then i need to write a code for send a alerting mail to my mail id. </p>
  
  <p>pls someone help me...</p>