On Tue, 28 Nov 2023 16:21:29 GMT, Kevin Walls <kev...@openjdk.org> wrote:
> JMX RMI Connections should use a timeout on the Socket connect call by > default. > > JMX Connections use RMI and some connection failures never terminate. The > hang described in 8316649 is hard to reproduce manually: the description says > it can be caused by a firewall that never returns a response. > > Changing the base RMI implementation may not be desirable at this time. > > JMX can use a new ClientSocketFactory for RMI which implements the connect > timeout, which can recognise a new JMX-specific property > `com.sun.management.jmxremote.rmi.tcpConnectTimeout` > (named like the existing com.sun.management.jmxremote... properties) > > Defaulting to a 1 minute timeout on connect has no effect on existing tests, > and should go unnoticed unless there really is a significant connection > delay. Specifying zero for the new System Property will use the old technique > of a connect with no timeout. > > This can be tested, but it is not realistically usable: although specifying a > 1 millisecond timeout will often fail (as expected/desired for the test), it > will very often pass as the connection happens immediately. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/16856