> > As for testing for stale connections - there is a parameter when DBCP > > pools are created that allow you to specify a query to check a > > connections health. If the query fails - then the connection is > > considered bad and DBCP will discard the connection and open a new one. > Right, specifically, set the validationQuery property of your > PoolableConnectionFactory, and set one (or more) of testOnBorrow, > testOnReturn or testWhileIdle to true. (The BasicDataSource > bundle will automatically set testOnBorrow to true when a > validationQuery is set.) It seems to me that whenever I use a connection with testOnBorrow==true then I'm actually performing 2 queries: the validation and my own query. This sounds particularly inefficient. TestWhileIdle sounds a lot better in that aspect. Can I get that running using the Tomcat JNDI interface?
> I think this topic has been discussed a few times on the user > or dev list > or both, you may want to search the archives (e.g., > http://archives.apache.org/ for more.) Thanks for the link, but I'd already searched there, and couldn't find what I'm currently seeing there. Anyway thanks a bundle for the help guys, appreciate it. Martin van Dijken -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>