000022285 - Setting Timeout using RSA ClearTrust Runtime Java API not working during the connect method

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000022285
Applies ToRSA ClearTrust 5.5.3 Runtime Java API
IssueSetting Timeout using RSA ClearTrust Runtime Java API not working during the connect method
If RSA ClearTrust servers are not running, setting the timeout parameter to X seconds when calling the connect method of the ConnectionDescriptor object still takes 1 minute before the object times out
CauseThis is operating as designed due to the behavior of the base class ?java.net.SocketImpl?. The socket timeout will only be use to control the timeout of the socket once the connection has been made, and not during the creation of the connection. Once a connection has been made, the timeout value will take effect. When there is connectivity problems after a successful connection, then the connection will timeout base on the value you set on the setTimeout method or using ConnectionDescriptor(?,int timeout).
ResolutionThe actual socket connection timeout can be set using: options.put( OptionConstants.REFRESH_PERSIST_TIME, "60000").  Give a String object for the value of REFRESH_PERSIST_TIME representing time in milliseconds.
Legacy Article IDa27757

Attachments

    Outcomes