Not sure if this is the right forum, but I'm hoping for some configuration setting to alleviate this problem. So...
We have a two JBoss installs that use EJB3s. Our db is clustered. At times our db fails over. When this happens JBoss' connections get all weird (technical term). We start seeing the following exceptions in the logs:
10:52:46,385 ERROR [JDBCExceptionReporter] java.net.SocketException: Broken pipe
This happens for a long time after the db recovers. So long that we usually just restart JBoss. This works, but is a royal pain. It seems as if JBoss is not clearing the pool of invalid/corrupt/etc connections. Is there any setting that will cause JBoss to purge the connection pool of these bad connections and acquire new ones when such a situation occurs?
taken from the jboss documentation
check-valid-connection-sql: This is a SQL statement that should be run on a connection before it is returned from the pool to test its validity to test for stale pool connections. An example statement could be: select count(*) from x.
this attribute needs to be added in your ds file.