Some comments on the current state of pinging and ponging.
The was it was envisioned to work was as follows, I think this is how it was orginally
done too:
1) The client pings the server with a Ping, - this is a blocking call, and the server
responds with a Pong. The Pong contains a boolean flag.
If the flag is true it means the session is still alive on the server (all ok).
If the flag is false it means the session has already been cleared up on the server - this
might happen due to an unresponsive client or glitch in the network. (You can get spurious
false failure detection on either the client or server side e.g. if the network cable is
temporarily unplugged then plugged in again)
In the false case, since the server session is already dead, the client session will get
cleaned up and the client side exception listener will be called.
2) Also the server needs to independently ping the client - so this is the same as 1) but
the other way round.
The server sends a ping to the client (blocking) and the client returns with a pong.
Again, the pong contains a boolean flag. This time if true it means the client session is
still alive, if false it means the client session has been cleaned up - this can happen if
there is a temporary glitch in the network.
If false, the server will clean up (close) the server side session and remove it.
Doing it this way prevents issues such as the server thinking the client is dead when it
isn't or vice versa. We had quite a few problems with JBR 2 which did pinging poorly
and we don't want to make the same mistakes.
This is going to need some reworking.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152821#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...