OpenEdge provides a Connection class, com.progress.open4gl.javaproxy.Connection. This Connection object provides a means to store application server connection information, which can be passed to the AppObject constructor when connecting to the application server.

The Connection object has two constructors, as shown in the syntax boxes that follows.

The following constructor specifies the application server connection information (url), user ID, password, and information required by the application server application at connection time:

Syntax

public Connection(String url, String userid, String password, 
     String AppServer-info)
Note: The combined length of the url, userid, password, and AppServer-info fields must not exceed 30,000 non-Unicode characters when connecting to an application server.

The following constructor specifies the user ID, password, and information required by the application server application at connection time:

Syntax

public Connection(String userid, String password, String appserver-info)

The constructor above uses default application server connection information. This defaults the URL to http://localhost:8810/apsv/, where apsv is the AppService Name setting specified in the general settings of the ProxyGen Generate Proxies dialog box.

Before you establish a connection, you can set properties for the Connection object. See Access Proxy Properties for information on setting and updating Connection object properties.

In particular, the Connection class has a clientPrincipal property, which associates a ClientPrincipal object with a Connection object. A ClientPrincipal object acts as a token for passing security information, like user credentials, between various parts of an application. See Client principal class for more information about ClientPrincipal objects.