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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
