Previous Next

CONNECT( ) method (AppServer)
Physically connects and associates an AppServer instance, or logically connects an application service, with the specified server handle. The current application becomes a client application of the connected AppServer.
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 an AppServer connection. These parameters include two types:
*
*
Table 69 describes the basic connection parameters you must specify to connect to an AppServer instance or application service, regardless of the session model.
 
Connection parameter1
-AppService application-service 
-H [ host_name | 
IP-address ]
-S [ service-name | port-number ]
-DirectConnect
If specified, the -H and -S parameters are interpreted as the network address and TCP/IP port number of an AppServer connection. Otherwise, the -H and -S parameters are interpreted as the network address and UDP port number of a NameServer.
-ssl
(Used in conjunction with the -AppService, -H, and -S parameters).
-nosessionreuse
-nohostverify
-pf filename 
A text file containing any of the other AppServer connection parameters described in this table or
Table 70. If this file contains any other OpenEdge startup parameters, the method ignores them.
-AppServerKeepalive capstr 
The default value is allowServerASK.
-URL Web-or-AppServer-path 

1
Previous versions of the AppServer allow you to include a network protocol using the -N parameter, which must always specify TCP. While still allowed, it is optional and always defaults to TCP/IP.

Note:
Connections to an Internet-secure (HTTPS) or SSL-enabled AppServer require the management of public keys on the client (SSL client) and private keys on the server (SSL server). For an Internet-secure AppServer, the SSL server is the Web server that hosts the AIA. For an SSL-enabled AppServer, the SSL server is the AppServer itself. For information on configuring a Web server for HTTPS, see your Web server documentation. For information on using SSL to secure an AppServer, see OpenEdge Application Server: Developing AppServer Applications. For information on configuring an AppServer for SSL tunneling, see OpenEdge Application Server: Administration. For information on managing private key and digital certificate stores for SSL clients and servers, see OpenEdge Getting Started: Core Business Services - Security and Auditing.
Table 70 describes connection parameters for specifying and managing the session model of the connection.
 
-sessionModel sessionModel 
This value is not case sensitive.
The default value is Session-managed.
-connectionLifetime nSeconds 
-initialConnections nConnections 
-maxConnections nConnections 
-nsClientMaxPort portNum 
-nsClientMinPort portNum 
-nsClientPicklistExpiration nSeconds 
-nsClientPicklistSize nPicks 
-nsClientPortRetry nRetries 
-nsClientDelay nMilliSeconds 
Note that the actual AppServer that the client connects to is controlled by the NameServer based on the application service (-AppService) name specified by the client. The ABL interface in cooperation with the NameServer connect the client application to one of the AppServer instances that supports the specified application service. If you do not specify an application service, the NameServer uses whatever AppServer registers itself as the default service, if any. For more information on load balancing, see the information on NameServers and load balancing in OpenEdge Application Server: Developing AppServer Applications and the AppServer administration chapter in OpenEdge Application Server: Administration.
If the application service is unknown to the NameServer, the client application receives an error. Otherwise, the connection proceeds and any configured Connect procedure executes for the connected AppServer.
For more information on application services and NameServers, see OpenEdge Application Server: Developing AppServer Applications.
[ userid ] [ , password ] [ , app-server-info ]
From one to three character string parameters passed as input to the AppServer Connect procedure. The possible values that you can specify for these parameters is determined by the Connect procedure for the AppServer 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. Otherwise, it returns TRUE. An error can occur if:
*
*
*
One of the values specified in the connection-parms parameter is invalid.
*
*
*
*
*
If the CONNECT( ) method completes successfully, the CONNECTED( ) method returns TRUE.
The connection lasts until the client application executes the server handle DISCONNECT( ) method or until the AVM detects any failure conditions that automatically terminate the connection.
The -URL connection parameter allows you to connect to an AppServer using the AppServer Internet Adapter (AIA) with the following protocols: HTTP and HTTPS.
For more information on AppServers or the AppServer Internet Adapter (AIA), see OpenEdge Application Server: Developing AppServer Applications.

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