Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Database Connection Issue

 
Todd Plambeck
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running an app on Tomcat 4.1 and having some database issues. If my DB server goes down and comes back up, the app in Tomcat crashes and can't reconnect to the database. Is this expected behaviour? Any insight on what's going on and a fix/work around would be greatly appreciated.

Thanks,

Todd
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An app crashing is certainly not expected behavior. Database connections can become stale even without the server going down, so the app should allow for that, and gracefully recover by re-connecting to the DB. A database connection pool can greatly help in this regard.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic