I have an RMI client (on JBoss) and when the RMI server (on WebLogic) is brought down, I need the RMI client to get back a diconnect callback from server. This works perfectly when the RMI client is standalone. But when it is inside Jboss, the app server detects this disconnect and does NOT allow the callback to reach the client. It just displays the following line of code:
[WARN,OILServerILService] Connection failure (1).
java.net.SocketException: Connection reset by peer: JVM_recv in socket input str
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.ObjectInputStream.peekCode(Unknown Source)
at java.io.ObjectInputStream.refill(Unknown Source)
at java.io.ObjectInputStream.read(Unknown Source)
at java.io.ObjectInputStream.readByte(Unknown Source)
at java.lang.Thread.run(Unknown Source)
This is not good for my application 'cos the client is not aware of the disconnect. It needs to do certain logic as soon as a disconnect has occured.
Is there a Disconnect Listener in Jboss that I can extend or implement in my RMI client ? I know there is one on WebLogic called DisconnectListener which any class can implement.
I realied the problem was within my application. Thsi exception was because the message service got disconnected.