On Mon, Aug 11, 2008 at 11:32:24PM -0500, O'Keefe, Matthew wrote:
> We have discovered an issue with Jini 2.1 that can cause a client to
> hang if a service VM enters a bad state.  While this issue is
> somewhat similar to http://issues.apache.org/jira/browse/RIVER-254,
> the patch that I would like to propose is a bit different, and still
> applicable to apache-river-2.1.1.

This issue is in a similar area as RIVER-254, but yes it is different.

[snipped description of server that accepts connections but never
responds with any data over them]

> This caused Mux.start on the client side to hang indefinitely due to
> a call to Object.wait without a timeout:
[snip]

> I would like to see a RemoteException thrown on the client side if
> Mux.start takes too long to establish a connection.  This would
> enable us to discard the bad service and retry with another.

Yes, there definitely should be some sort of timeout supported there
(as suggested by the code comment).  I think that this was pending
discussion about a wider range of timeout support in the API (like new
constraints), which got bogged down in complexity, but that shouldn't
prevent a simpler (like property-based) timeout being supported here.

> The patch that I would propose would look like this, except with the
> hard-coded timeout value changed to a property:
[snip]

> Is this a reasonable approach?

I think so.

-- Peter

Reply via email to