RFR: 8316649: JMX connection timeout cannot be changed and uses the default of 0 (infinite)

Kevin Walls kevinw at openjdk.org
Mon Nov 27 14:38:08 UTC 2023


On Fri, 24 Nov 2023 16:28:38 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:

>> Thanks, yes so JMX SSL clients are without socket connect timeout, good to have that documented.  I logged a parallel RFE for SslRMIClientSocketFactory, which should wait for now as it seems wrong to go changing that right now without knowing if it's ever been an issue for anybody:
>> [JDK-8320703](https://bugs.openjdk.org/browse/JDK-8320703): JMX SSL RMI Socket connection timeout cannot be changed
>
> wrt to the property name initialConnectTimeout might infer that it is an initial value which can be subsequentually modified, but that is not possible. As such, would sun.rmi.transport.tcp.connectTimeout be more appropriate -- dropping the initial ?
> 
> If the connectTimeout initialization code was placed in a static method, it could  be directly unit testable :-) (if such a test was desirable for coverage completeness)

On the Property name: there is an existing System Property "sun.rmi.transport.connectionTimeout" which is a 15-second idle timeout.  Having a "connectionTimeout" and this new one as  "connectTimeout" could be confusing, even in different but very similar package names, hence naming this "initialConnectTimeout".
(So "initial" to signal that it's the initial connect of a socket, different to the existing "connectionTimeout".) 
It does not seem like the kind of system property a user would expect to be read again on every usage, I think, let me know if you see that as a problem.

I am hoping that as we already have various properties fetched in the same manner, we don't see the need to pursue a test that the value is fetched and passed on.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16771#discussion_r1406256156


More information about the serviceability-dev mailing list