Previous Topic: Establish a Connection to the Policy Server

Next Topic: Establish a User-Defined Connection to the Policy Server

Establish a Default Connection

If you have not already established a connection to the Policy Server, you can request an automatic connection. If SiteMinder establishes a connection for you automatically, it creates a default Java Agent API object and handle. However, if a valid user-defined handle already exists, SiteMinder does not create a default object and handle. A user-defined handle takes precedence over a default handle.

To establish a default connection to the Policy Server automatically

  1. Use the following constructor to create an API connection object:
       SmApiConnection (boolean bDefaultAgentConnection
                                    boolean disableLoadBalancing)
    
  2. In the constructor, set bDefaultAgentConnection to true—for example:
       SmApiConnection m_defaultConnection = 
                                    new SmApiConnection(true,false);
    
  3. If bDefaultAgentConnection is false, you must explicitly establish the connection in your client code.

An automatic connection has the following requirements: