Thank you very much for the information. I wonder what is the implication of this in term of performance. This effectively double the number of query if my query is small and one for each request to have a connection handle (but under very heavy load). Also, what's a generic way for doing this across other database, for example, MySql, MS Sql, etc. Also, what if the table does not exist?

I saw some other method, such as getMetaData, what is the implication of performance on this?

Thank you very much for your consideration,

Vy Ho

Holly, Michael wrote:

Configure your connection pool to use the 'Test On Borrow' feature.
This will send a small query out to make user the connection is
available before it uses the connection for the larger query.  Your
query could be like  "SELECT 'test' from dual"  if you are on Oracle.


Hope this helps

Michael

-----Original Message-----
From: Vy Ho [mailto:[EMAIL PROTECTED] Sent: Friday, July 16, 2004 2:15 PM
To: 'Tomcat Users List'
Subject: Connection pool detecting bad connection




I am sure people with DBCP background would know about this. My question is what is the generic/common/standward JDBC way of check a connection to see if it's a good connection or not. Check thing like:

con.isClosed() works in some case, and does not in another case.

Would retriveing the metadata do it?  What is the implication in term of

performance for this?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to