Atomikos Forum |
|
I am testing connection recovery after a database failure. I have my application running locally on my laptop and simply disconnect my ethernet cable to simulate connection loss to the database. I try my application a few times while the database is not accessible to generate some errors, then reconnect. I am setting the minPoolSize = 5 so that I have some pooled connections to recover.
What I notice is that some(most?) times, after I reconnect that my application will work on the first try. But sometimes I will get a few errors after before the application works. The exception comes from testUnderlyingConnection() on the test for isErroneous(). What would cause erroneous connections to remain in the pool after a failure sometimes but not others? Thanks |