tomcat icon indicating copy to clipboard operation
tomcat copied to clipboard

tomcat-jdbc check if returned connection is closed

Open panchenko opened this issue 4 years ago • 1 comments

https://bz.apache.org/bugzilla/show_bug.cgi?id=64083

I had a situation when driver closed connection because of I/O error, bur connection has been added to the avaialble ones and then returned to another caller. The testOn* properties were not enabled in that case.

It looks like the pool can easily check if connection has been closed and don't accept it back. WDYT?

panchenko avatar Jan 16 '20 09:01 panchenko

The test checks that connection obtained from the pooll second time can be used for query execution. Without this pool code change it returns the closed connection and query exection fails.

I agree the intent is not fully clear, as it tests it as black-box, I will check if some white-box asserts can be added.

panchenko avatar Aug 28 '21 09:08 panchenko