I'm use Hikari jdbc connection pool.
when execute statement witch produce an exception ( for example by network is broken). as following:
try{ Connection con = pool.getConnection(); con.executeQuery("...."); }catch(Exception e){ con.close(); } does con.close will evict the broken connection, instead of release it to the pool.
if the broken connection is released to pool. it maybe got by following request of getConnection.