> 10 to 1 you've got stale connections in your pool; first try fails, second > one gets a fresh connection
I thought the same autoReconnect Should the driver try to re-establish stale and/or dead connections? If enabled the driver will throw an exception for a queries issued on a stale or dead connection, which belong to the current transaction, but will attempt reconnect before the next query issued on the connection in a new transaction. The use of this feature is not recommended, because it has side effects related to session state and data consistency when applications don't handle SQLExceptions properly, http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html You can implement your own realm extending DataSourceRealm and overriding authenticate() method with your traces . And don't forget to call super.authenticate(). More info: http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#DataSourceRealm --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org