sorry if someone has already mentioned this, but you will probably have to add the testOnborrow Parameter. So that also means you have to use the ValidationQuery, etc... but it(the pool) should try to restablish a connection at that point.
testOnBorrow will cause some more overhead, but it might resolve your problem. here's an example.. <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <parameter> <name>driverClassName</name> <value>oracle.jdbc.driver.OracleDriver</value> </parameter> <parameter> <name>url</name> <value>jdbc:oracle:thin:@<host>:<port>:<sid></value> </parameter> <parameter> <name>username</name> <value>john</value> </parameter> <parameter> <name>password</name> <value>doe</value> </parameter> <parameter> <name>maxActive</name> <value>5</value> </parameter> <parameter> <name>maxIdle</name> <value>5</value> </parameter> <parameter> <name>maxWait</name> <value>-1</value> </parameter> <parameter> <name>removeAbandoned</name> <value>true</value> </parameter> <parameter> <name>validationQuery</name> <value>select count(*) from dual</value> </parameter> <parameter> <name>testOnBorrow</name> <value>true</value> </parameter> On 3/19/07, Gioia, Michael <[EMAIL PROTECTED]> wrote:
Hi, I'm new to tomcat and have a problem with keeping up the connection to the database thru the connection pool. Almost every weekend the database gets bumped and the java app that were running needs to have tomcat restarted to reconnect to the database thru the connection pool. When we come in on Monday tomcat and the database are up and running, but the app will not connect to the database. Is there a way to reestablish the connection so our users don't have to wait until we come in on Monday to restart tomcat? Many Thanks, MG