The description of the issue is as follows…
We have recently implemented a firewall. My Application is on one subnet and the data base is on another subnet.
Since then, on the Application it’s not possible to pass the authentication page if the deployed Application hasn’t been used for a while. This is due to the fact that the portal is opening a connection with MySQL(4.1) database only at startup and doesn’t pick up that the firewall dropped the connection if there isn’t any traffic during a certain period.
We are using Spring frame work and Connection pooling for connecting to DataBase.
The Application should be able to notice that the connection has been lost and reestablish the connection.
Is there any way to reestablish the connection with MySql.
TestWhileBorrow and validationQuery property of CustomDataSource has solved this issue upto the certain extends but still connection fails at the first attempt.
So is it possible to connect the MySql on the very first attempt.