search cancel

Java SDK Agent Initialization Delays

book

Article ID: 6286

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

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

Environment

SDK : 12.52SP1CR06 Policy Server: 12.52SP1CR6 on Solaris 10 (SPARC)

Cause

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.

Resolution

 The default connectionTimeout is 3000 ms but it can be modified by passing the following parameter into the JVM at runtime:


 -DNONBLOCKING_CONNECTION_SLEEP_TIME=1000

 

Example of startup agent (With debug and non blocking connection) : 

java -Dcom.ca.siteminder.sdk.agentapi.enableDebug=true -DNONBLOCKING_CONNECTION_SLEEP_TIME=1000 myClass