On 2/24/2011 11:35 AM, chris derham wrote:

When I mention them that their programs should handle the situation
resulting from the database bounce automagically and not the dba handling
the web app or Tomcat shutdowns and restarts, they look at me like I came
from Mars or Saturn :-)


If you code the app to use a connection pool, the connections are cached.
The connection pool can be configured to test the connection, and remove it
from the pool if it has been closed. In this way as the app asks for a
connection, if the database has been restarted, old connections will be
dropped and new ones created.

That's what I do, but I handle it in my app instead of using DBCP.


Various different ways to configure the connection pool - in the app or in
the container. We use DBCP and works fine for us in the scenario you
describe

Just search google for tomcat database connection pool.

HTH

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to