Title: BasicDataSourceFactory and validationQuery parameter

Has anyone used (successfully) the validationQuery parameter specifiable in server.xml for a JNDI datasource.

--- background ---
When specifying a JNDI datasource resource a parameter exists -
<validationQuery> - that can be used to validate a connection before returning
it to the client. - sounds useful !

Is this implemented? I have set up a connection pool with this parameter
set and all runs fine. If I pull out the wire between Tomcat and the
database (or terminate the listeners) I would expect that the validation query should fail, and some
error get thrown. This does not seem to be the case. Instead an
SQLException: socket connect failure (or something like that) is thrown when
trying to use the connection returned from the pool.

This rather extreme example raises another interesting (well I think so)
question: If all of the connections in the pool are now broken - i.e. have
had the socket reset - is it possible to "refresh" all of the pooled
connections.

What seems to be happening is that connections are returned and invalidated
by the error until all broken connection are exhausted - then new ones are
being created.

Any thoughts would be appreciated

Rob

Rob Horn
Systems Engineer

Mobile :        07808 822 922  [723 2922 (mobex)]

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


Reply via email to