Previous Next

CONNECT( ) method (Pacific Application Server)
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:
Applies to:
 
Syntax 
CONNECT ( [ connection-parms ] 
            [ , userid ] 
            [ , password ] 
            [ , app-server-info ] )
All of the parameters for the CONNECT( ) method are optional and have defaults if you do not specify them.
connection-parms
A character string containing a space‑separated list of one or more connection parameters necessary to establish connection to a PAS for OE instance.
Table 71 describes the connection parameters available to connect a PAS for OE instance.
 
-NoSessionReuse
-NoHostVerify
-pf filename
Where filename specifies a text file containing any of the other PAS for OE connection parameters described in this table or Table 70. 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 value is not case sensitive.
-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
Is either HTTP or HTTPS.
/[web-app-name/|ROOT/|/]apsv
Specifies the OE ABL Web application and ABL client (or Open Client) transport (apsv) to connect with, where web-app-name is the name of an OE ABL Web application other than the default (oeabl.war) and any other combination specifies a connection to the default OE ABL Web application.
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:
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.
Note:
Connections to an Internet-secure (HTTPS) PAS for OE instance require the management of digital certificate stores for public keys on the client (SSL client) and private keys on the PAS for OE instance (SSL server). For information on configuring PAS for OE for HTTPS connections, see the Pacific Application Server for OpenEdge: Administration Guide. For information on using SSL to secure the client side of a PAS for OE application, see the Pacific Application Server for OpenEdge: Application Migration and Development Guide. For information on managing digital certificate stores for OpenEdge SSL clients, see OpenEdge Getting Started: Core Business Services - Security and Auditing.
[ userid ] [ , password ] [ , app-server-info ]
From one to three character string parameters passed as input to the PAS for OE Connect procedure, which is specified by the sessionConnectProc property in the instance openedge.properties file. The possible values that you can specify for these parameters is determined by the Connect procedure for the business application. If you omit a parameter, it defaults to the Unknown value (?).
If an error occurs while executing the CONNECT( ) method, the method returns FALSE. Some conditions for which an error can occur include:
*
*
*
One of the values specified in the connection-parms parameter is invalid.
*
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:
 
DEFINE VARIABLE happsrv AS HANDLE NO-UNDO.
 
CREATE SERVER happsrv.
IF happsrv:CONNECT("-URL http://localhost:8810/GeneralLedger/apsv 
                    -sessionModel session-free") THEN
DO:
    /* Some accounting work on the local PAS for OE instance */
END.

Previous Next
© 2014 Progress Software Corporation and/or its subsidiaries or affiliates.