Previous Topic: Establish a Default Connection

Next Topic: Obtain a Session

Establish a User-Defined Connection to the Policy Server

You establish a user-defined connection in one of two ways:

Note: If you already have a connection to the Policy Server, you can use it to make subsequent Policy Management API or DMS API calls.

To create a connection using an existing Agent API connection

  1. Create your connection object through the following constructor:
       SmApiConnection (netegrity.siteminder.javaagent.AgentAPI
                                                  agentApiConnection)
    
  2. In the constructor, use agentApiConnection to pass in the handle of the existing Agent API connection—for example:
       SmApiConnection myConnection = 
                          new SmApiConnection (myAgentApiConnection);
    

    The new Java Agent API handle is a user-defined handle.

If you do not already have a default connection and you want a user-defined connection object, you can use the Agent API to create the agent object and then create the new connection, as follows:

  1. Create the agent object.

    You can create an agent object based on connection parameters from either of the following sources:

    Note: With SiteMinder v6.0 and later, the authorization, authentication, and accounting servers are combined into a single server process. Consequently, authorizationPort, authenticationPort, and accountingPort can all be set to the same value.

    Note: SiteMider v4.x webagent.conf files are no longer supported by the SM API.

  2. Create the new connection.

    After creating the agent object, you create the new connection in either of these ways:

    If you establish the connection in this way, the Java Agent API handle is a user-defined handle.

    If you call setAgentApiConnection() and you do not have a connection, you can establish an automatic, static connection by passing in null.