Connects and associates an instance of the Pacific Application Server for OpenEdge (PAS for OE) with the specified server handle and specifies the application model for the connection.The current application becomes a client application of the connected PAS for OE instance using the specified application model.
Return type: LOGICAL
Applies to: Server object handle
All of the parameters for the CONNECT( ) method are optional and have defaults if you do not specify them.
The following table describes the connection parameters available to connect a PAS for OE instance.
Connection parameter | Description |
---|---|
-NoSessionReuse | If specified, the connection does not reuse the SSL session ID when reconnecting over HTTPS to the same PAS for OE instance. |
-NoHostVerify | If specified, turns off host verification for an HTTPS connection. Without this parameter specified, the client compares the host name specified in the connection with the Common Name specified in the server certificate, and raises an error if they do not match. With this parameter specified, the client never raises the error. For more information, see OpenEdge® Getting Started: Core Business Services - Security and Auditing. |
-pf filename | Where filename specifies a text file containing any of the other PAS for OE connection parameters described in this table or Table 2. If this file contains any other OpenEdge startup parameters, the method ignores them. |
-sessionModel option | Where option specifies the application
model required by the ABL client for this connection, which can have one of
the following values:
This parameter is required for session-free applications and is optional for session-managed applications. The default value is Session-managed. |
-URL web-path | Where web-path specifies the URL to a PAS
for OE instance using the following
syntax:scheme://host:port/[web-app-name|/ROOT/|/]apsv Where:
For example, assuming a given PAS for OE instance (scheme, host, and port (.)), an ABL client connection to an OE ABL Web application deployed in a WAR file named inventory.war has the following URI:
An ABL client connection to the default OE ABL Web application on the same PAS for OE instance can be represented by either one of the following URIs:
|
The client determines the application model that the PAS for OE instance uses for each connection, because ABL sessions on PAS for OE run using any application model that a given client requires.
If an error occurs while executing the CONNECT( ) method, the method returns FALSE. Some conditions for which an error can occur include:
If the CONNECT( ) method completes successfully, the method returns TRUE.
The connection lasts until the client application executes the server handle DISCONNECT( ) method or until the server session detects any failure conditions that automatically terminate the connection.
For example, the following code fragment makes a session-free connection to an OE ABL Web application named GeneralLedger on a local instance of PAS for OE: