I have not been able to find any solution to this so hopefully someone can give a hand. My client java app posts messages to a Queue on a jboss-3.0.7 server. This is setup and runs fine with re-connects on errors etc.
When running the client under linux (tries redhat 7.2 and 8.0) the send will hang in org.jboss.mq.Connection.sendToServer if the network has physically disappeared (ie pull the net plug). I have only hade the patience to wait some halfhour, so it is possible some ttl will kick in. This is not the case for windows xp or 2000 which will nicely give a socket read exception immediately. The ping handling in OIL does not cause any noticable logging or calls to onException. I tried UIL2 which gave me a call to onException after the hearbeat failed, but i still had problems trying to abort and cleanup the sending thread. Shuting down the jboss server (hard or nice) does not cause the same problems.
How can i reliably detect that the server is no longer available and recover? Is there some workaround/fix for linux? Suggestions? Hopefully I can find a solution based on JbossMq and the JMS specs.
The problem is in the socket implementation.
It can block forever without giving an error
and in java 1.3 it is not possible to interrupt the I/O.
The ping should detect the failed connection
and invoke onException.
What problems are you seeing recovering the
It is very noisy in the logs but it should work.
Post your recovery code.