davoustp edited a comment on issue #170: Connections validated without explicit validation query leave a transaction open URL: https://github.com/apache/tomcat/pull/170#issuecomment-503323483 Agreed, the driver is expected to be as thin and stateless as possible. Indeed, using a flag to track if the transaction has been cleared or not and performing the rollback in the latter case in a `finally` block is a much better solution as it would simplify the code and, even more importantly, it will also cover the corner cases which are not taken care of with by my initial commit (unchecked exceptions, or `Error`s). I'll do this for both code paths (with and without a validation query) and commit the changes to the PR so we can have another look to check if there are some remaining issues.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org