How do client and server side connection monitoring interact
This topic has not yet been written. The content below is from the topic description.
As of Remoting version 2.4, the client side and server side connection monitoring mechanisms can be, and by default are, more closely related, in two ways. If the parameter org.jboss.remoting.ConnectionValidator.TIE_TO_LEASE (actual value "tieToLease") is set to true, then, when the server receives a PING message from an org.jboss.remoting.ConnectionValidator, it will return a boolean value that indicates whether a lease currently exists for the connection being monitored. If leasing is activated on the client and server side, then a value of "false" indicates that the lease has failed, and the ConnectionValidator will treat a returned value of "false" the same as a timeout; that is, it will notifiy listeners of a connection failure. The default value of this parameter is "true". Note. If leasing is not activated on the client side, then this parameter has no effect. If the parameter org.jboss.remoting.ConnectionValidator.STOP_LEASE_ON_FAILURE (actual value "stopLeaseOnFailure") is set to true, then, upon detecting a connection failure, ConnectionValidator will stop the LeasePinger, if any, pinging a lease on the same connection. The default value is "true". Note. As of release 2.5.2, an important concept related to connection monitoring, connection identity, is available. Suppose that leasing is enabled and that a client invoker stops and is replaced by a new client invoker. If the replacement occurs quickly, the server side Lease may never miss a ping, in which there is no evidence that anything changed on the client side. That is, the connection is still alive, as far as the server is concerned. That semantics might be perfectly acceptable for some applications, but other applications might interpret the same events as a connection failure followed by a new connection. Remoting can be configured to treat a connection as being defined by a client/server pair, which supports the second category of applications. More specifically, when configured to do so by setting the parameter org.jboss.remoting.Remoting.USE_CLIENT_CONNECTION_IDENTITY (actual value "useClientConnectionIdentity") to "true", Remoting identifies a connection with a LeasePinger/Lease pair. A Client participates in a connection when it is connected by way of the new method public void connect(ConnectionListener listener, Map metadata) throws Exception; This method serves to connect the Client to the server by way of a new or existing client invoker, and it also (1) registers the ConnectionListener with the Client's new or exiting ConnectionValidator and (2) registers the ConnectionValidator with the client invoker's LeasePinger. Subsequently, if any ConnectionValidator registered with that LeasePinger detects a connection failure, it will (if "stopLeaseOnFailure" is "true") stop the LeasePinger, and the LeasePinger will cause each registered ConnectionValidators to notify each of its registered ConnectionListeners of the connection failure. Once the LeasePinger has been shut down and all of the notifications have been made, the connection anchored by the LeasePinger is defunct, and the associated Client's should be disconnected by a call to Client.disconnect(). If such a Client is reconnected by a call to Client.connect(), it will be associated with a new LeasePinger and, therefore, a new connection. TIE_TO_LEASE (actual value "tieToLease") - specifies whether ConnectionValidator should treat the failure of a related lease on the server side as a connection failure. The default value is "true". STOP_LEASE_ON_FAILURE (actual value "stopLeaseOnFailure") - specifies whether, when a ConnectionValidator detects a connection failure, it should stop the associated org.jboss.remoting.LeasePinger, if any. The default value is "true". org.jboss.remoting.Remoting.USE_CLIENT_CONNECTION_IDENTITY (actual value "useClientConnectionIdentity") - tells Remoting to adhere to the new "connection identity" semantics.