Hide
On the presented environment, the JDBCPool does not renew expired connections to the database.
This is due to the fact that the IConnection.isPhysicallyClosed() method called to check the validity doesn't report a consistent state, a real failing operation has to be performed to see this parameter correctly updated.
Anyway, the Connection Interface provides the isValid(int timeout) method that enforces any implementation to perform an operation that would really check the link to the database server...a call to that method updates the isPhysicallyClosed() parameter as well.
Thanks to the clear organisation of the Easybean project, I wrote a really simple fix (posted in a patch) that just double checks connections (with checkLevel=1) with IConnection.isPhysicallyClosed() and Connection.isValid(1).
That could be a good idea to include that small fix into the Head revision (if not already done by someone though)
Thanks.
Cheers
Richard
Show
On the presented environment, the JDBCPool does not renew expired connections to the database.
This is due to the fact that the IConnection.isPhysicallyClosed() method called to check the validity doesn't report a consistent state, a real failing operation has to be performed to see this parameter correctly updated.
Anyway, the Connection Interface provides the isValid(int timeout) method that enforces any implementation to perform an operation that would really check the link to the database server...a call to that method updates the isPhysicallyClosed() parameter as well.
Thanks to the clear organisation of the Easybean project, I wrote a really simple fix (posted in a patch) that just double checks connections (with checkLevel=1) with IConnection.isPhysicallyClosed() and Connection.isValid(1).
That could be a good idea to include that small fix into the Head revision (if not already done by someone though)
Thanks.
Cheers
Richard
Apply in module root (where the pom.xml is)