IntelliJ Java IDE
The moose likes JDBC and the fly likes Reconnecting to the Database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "Reconnecting to the Database" Watch "Reconnecting to the Database" New topic
Author

Reconnecting to the Database

Ian Morris
Greenhorn

Joined: May 23, 2001
Posts: 7
I have a couple of web based Java applications that access databases, one uses Oracle (oci drivers) and one MS SQL Server 2000 (odbc). I use Jakarta-tomecat-3.2.1 along with JSP and servlets.
My question is, is there a way to reconnect to the datbase automatically if, for example there is a network outage, I always have to re-start the Jakarta service (I assume this is because my database connections are setup in the init of a servlet, maybe this is wrong?).
Does database connection pooling avoid this? Should I be doing something else? Any advise is appreciated.
Ian.
 
 
subject: Reconnecting to the Database
 
Threads others viewed
The CATALINA_HOME enviornment variable
jdbc-servlets-connection pooling
How to know what tags are available in taglib and whats their behaviour ?
Thread Pooling
Which is faster : Jakarta RegExp or Java RegExp?
MyEclipse, The Clear Choice