On Fri, 24 Nov 2023 13:01:59 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> OK yes, we also have: 
>> java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java
>> with its own createSocket(String host, int port) method.  This is used if we 
>> use JMX over SSL.
>> 
>> So SslRMIClientSocketFactory could specifically implement the connect 
>> timeout.
>> 
>> Next q, should it?  8-)
>> 
>> The reported hang and those I have seen in testing have only been in:
>> sun.rmi.transport.tcp.TCPDirectSocketFactory.createSocket calling 
>> Socket.init.
>> 
>> javax/rmi/ssl/SslRMIClientSocketFactory.java reads some properties named 
>> "javax.rmi.ssl.client...."
>> so it would be odd for it to read 
>> "sun.rmi.transport.tcp.initialConnectTimeout" I was proposing here.
>> 
>> It could implement "javax.rmi.ssl.client.initialConnectTimeout", or we could 
>> leave SSL alone for now, possibly handling it in a separate issue if it's 
>> wanted.
>
> OK - sounds good. Meanwhile I had a look at the custom RMI Socket Factories 
> used by the JMX Agent, and these are actually RMIServerSocketFactories, so 
> having a timeout for connect there probably makes no sense.

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

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

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

Reply via email to