I have two JBoss AS 5 servers (S1 & S2) running in different locations and exchanging data through RMI. A couple of days ago there were some network problems which caused the RMI connections to hang, and they didn't recover at all. Today I restarted one of the servers (S1) and the connection from that server to the other was started correctly (S1 -> S2), while the other direction (S2 -> S1) was still hanging. Using lsof, I could see, that the S2 JBoss still had an open socket connection to S1. However, that respective connection could not be found with lsof on S1.
As far as I understand, jboss remoting has a read timeout of 30 minutes (client side). This means, that whatever happens, a connection should be closed after 30 minutes idle time, right?
How can it be possible, that the connection stays alive for days, even if the physical network link is not available (the admins have exchanged a network switch ...)? Is there anything I can do, either in my code or in configuration, to make sure, the RMi call get properly cancelled in such cases?