[
http://jira.jboss.com/jira/browse/JBREM-891?page=comments#action_12395825 ]
Ron Sigal commented on JBREM-891:
---------------------------------
There are two aspects to the new feature.
1. An org.jboss.remoting.ConnectionValidator can optionally request that the corresponding
org.jboss.remoting.ServerInvoker responds to a PING with a boolean, returning
true if and only if leasing is turned on and the lease associated with the
ConnectionValidator's client invoker is still alive.
2. A ConnectionValidator can optionally stop the org.jboss.remoting.LeasePinger associated
with its client invoker when the ConnectionValidator detects a failed connection. The
failure can be detected by either
a. no response to a PING, or
b. a return value of false when the facility described in item 1 is turned on.
These two facilities may be configured by the respective parameters:
ConnectionValidator.TIE_TO_LEASE (actual value "tieToLease"): defaults to
true
ConnectionValidator.STOP_LEASE_ON_FAILURE (actual value
"stopLeaseOnFailure"): defaults to true.
I.e., these two facilities are turned on by default.
These parameters may be specified in three ways:
1. The InvokerLocator;
2. The configuration map passed to the org.jboss.remoting.Client's constructor.
3. A metadata map passed to
org.jboss.remoting.Client.addConnectionListener(ConnectionListener listener, Map
metadata)
Unit tests: org.jboss.test.remoting.connection.ConnectionValidatorTiedToLeaseTestCase.
Waiting for test results from hudson.
ConnectionValidator should report if lease has expired
------------------------------------------------------
Key: JBREM-891
URL:
http://jira.jboss.com/jira/browse/JBREM-891
Project: JBoss Remoting
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Affects Versions: 2.2.2.SP4
Reporter: Ron Sigal
Assigned To: Ron Sigal
Fix For: 2.4.0.Beta1 (Pinto)
Clebert Suconic wrote:
> You have this scenario:
>
> - Client is paused for 1 minute (say... a huge GC for example)
> - Server will invalidate that client (and close server side's objects)
> - Client comes back alive... it will then resume pings...
> - Nothing will invalidate the client, and the client became isolated).
Reply:
This isn't a Remoting bug. What you have described is Remoting behaving correctly,
according to the current design.
1. On the server side, the lease mechanism can inform the application that the client is
"unavailable".
2. On the client side, the ConnectionValidator can inform the application that the server
is "unavailable".
One side or the other could be unavailable either because (1) it died or because (2) the
network isn't functioning. In the first case, it doesn't make sense for one side
to inform the other side of the failure, because there's no one on the other side to
talk to. In the second case, both sides should see and report the same failure.
In the scenario you've described, the client isn't really unavailable - the
apparent failure is just a timing artifact. The solution is to change the timing. I.e.,
extend the lease period.
Proposal:
If leasing is enabled on the server side, org.jboss.remoting.ServerInvoker, which
responding to a PING from org.jboss.remoting.ConnectionValidator, should indicate if the
lease is still alive.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira