开发者

sun.rmi.transport.tcp.readTimeout not effective

开发者 https://www.devze.com 2023-02-18 11:27 出处:网络
I have set sun.rmi.transport.tcp.readTimeout as a JVM parameter in the configuration file of my product which is available as a service. I have set a very minimal value of 1000ms, which means all oper

I have set sun.rmi.transport.tcp.readTimeout as a JVM parameter in the configuration file of my product which is available as a service. I have set a very minimal value of 1000ms, which means all operations done using my CLI that would take more than 1second should fail with the exception java.rmi.ConnectIOException: error during JRMP connection establishment; nest开发者_运维技巧ed exception is: java.net.SocketTimeoutException: Read timed out at sun.rmi.transport.tcp.TCPChannel.createConnection

Please let me know if I have missed any other parameter which is required to make this work. I want to set a timeout of say 10 minutes. But I want to set a really low value to confirm that the timeout is effective. Are the parameters java.rmi.activation.port and java.rmi.server.hostname related to this? Please refer http://www.codeguru.com/forum/showthread.php?t=246620.


which means all operations done using my CLI that would take more than 1second should fail

No it doesn't. A client-side timeout would do that, but sun.rmi.transport.tcp.readTimeout controls the read timeout at the server, which in turn has an effect on connection pooling. To control client-side read timeouts you need to set the undocumented property called (I think) sun.rmi.transport.tcp.responseTimeout at each client JVM.

0

精彩评论

暂无评论...
验证码 换一张
取 消