This is something that should be delegated to the remoting layer,
either because it has direct support or there are plugins.
It doesn't make sense when for example multiplexing for every client
of the "connection" to check the connection state in its own way.
There are likely other semantics when the remoting client supports
load balancing/failover that should not be visible to the "application client"
We're actually already using JBoss remoting's connection checking to propagate exceptions onto the connection exception listener on the client side.
What i couldn't work out was how to know on the server side if the connection has failed. Hence our own ping.
I do agree the best place for it is in remoting though.
I shall delve deeper to find out how remoting can help us here...