We have an issue with the connection of DB being lost when the DB server is getting restarted. We are using DBCP for the connection pool. We used autoReconnect=true which seems to solve this problem, but it is not recommended. Could anyone please suggest a suitable alternative for autoReconnect. We are already using testOnBorrow=true and validationQuery=SELECT 1. Thanks for your help!!
Tried autoReconnect=true, testOnBorrow=ture and validationQuery=SELECT 1. Want an alternative to autoReconnect=true since it is not recommended.