Custom Java Agent based on is taking about 3 seconds per policy server for initialization which is too long.
By checking the Agent log (stdout) with full debugging (-Dcom.ca.siteminder.sdk.agentapi.enableDebug=true) we can see :
10:33:05.125 [http-bio-18080-exec-9] SMTRACE: SmAgentTcpTransport, newInstance, Using SmAgentTcpTransport class
10:33:08.126 [http-bio-18080-exec-9] SMTRACE: SmAgentTliSession, setup, Initiating TLI handshake
The delay of about 3 seconds occurs in the Pure Java API and is caused by a change to NON-BLOCKING socket usage.
After a non blocking connect call, the code checks every 3 seconds for completion. If it is still failing after 5x3 seconds it will mark the connection as failed.
The default connectionTimeout is 3000 ms.
The default connectionTimeout is 3000 ms but it can be modified by passing the following parameter into the JVM at runtime:
Example of startup agent (With debug and non blocking connection) :
java -Dcom.ca.siteminder.sdk.agentapi.enableDebug=true -DNONBLOCKING_CONNECTION_SLEEP_TIME=1000 myClass