Hi Anmol Jain,
You can configure a background validation, that is responsible to check periodically if there are connections in the datasource pool that was broken, and if so, discard it and recreate a new one. Below are the three parameters that you need to configure, being the last one the period between checks, in milliseconds.
Hello Rafael Chies,
I forgot to mention the version of jboss. I am using jboss-eap-6.2.0 GA in Production environment.
Could you please confirm whether the configuration given by you holds good for jboss-eap-6.2.0.
Sure, it works for EAP 6.x. You can configure those parameters through Web Console, in the datasource configuration.