Description:
|
whenever a connection becomes invalid because of connection timeout by mysql, or server restart or any other similar situation in which the connections are in the pool but they don't exist in the server. In such cases, if a pool is not configured to validate connections in any way it simply returns the invalid connections causing exception by hibernate. In case of no hibernate, I would have handled such cases by implementing a retry mechanism. But if hibernate is there then it should facilitate the application by providing a retry mechanism to handle such cases instead of throwing exception right away. this is not a one-of-a-kind scenario and should be handled in a graceful manner by hibernate.
|