commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: [DBCP] what if the server goes off line
Date Sat, 06 Mar 2004 12:56:56 GMT
The simplest way is to restart tomcat when the database becomes 
available after the backup.

Another solution is to use a validationquery to detect if the 
connection to the server is still valid.
See http://jakarta.apache.org/commons/dbcp/configuration.html
for more details.

Another solution is to close the BasicDatasource when the Database 
goes down. Write a servlet that does a JNDI lookup, casts to 
BasicDatasource and then does a ds.close().
(The datasource will start automatically when the next getConnection 
is called).

-- Dirk

Federico Spinazzi wrote:
> Hi,
> 
> I've tried to use a DBCP connection pool with tomcat 4.1.24 via JNDI.
> The problem is that, when every night the database server (DB2 v8) goes 
> down to allow for a backup, the connection pool is no more usable.
> There is a way to deal with this situation?.
> Thanks,
> Federico



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message