Chema schrieb:
2012/3/5 Michael <sg...@gmx.net>:
Chema schrieb:
Do you have testOnBorrow="true" and a validationQuery="SELECT 1 FROM
DUAL" configured?
This should suffice to ensure each connection is valid before use.
Pid,
works like a charms. Thanks very much.
It executes the validation query and checks if there is no SQLException.
Thanks ...but , if you only restart the remote db , the query "SELECT
1 FROM DUAL" always works , am I wrong ?
No if the connection has been reset by the instance. The query will
result in a SQLException. You have to close the connection and open a
new one. The query works on an open connection only. That's the point.
See the second paragraph of this [1].
Mike
[1]
http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#isClosed%28%29
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org