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: 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.
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 70 describes the basic connection parameters you must specify to connect to an AppServer instance or application service, regardless of the session model.
Table 70: AppServer basic connection parameters Connection parameter1 Description If you connect through a NameServer, the name of an Application Service supported by the specified NameServer. (Defaults to the default service for the specified Name Server.) If you connect directly to an AppServer, this parameter is ignored. The network address to a NameServer machine or, if you connect directly, to an AppServer machine. You can specify either the TCP/IP host name or the Internet protocol address of the machine. (Defaults tolocalhost
) The UDP port number for a NameServer, or, if you connect directly, the TCP/IP port number for an AppServer connection. You can specify either an explicit port number or a service name. If you use a service name, the method uses the port number associated with that name in the TCP/IP services file. (Defaults to5162
) 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. If specified, the connection is direct to the AppServer using Secure Sockets Layer (SSL) tunneling.(Used in conjunction with the-AppService
,-H
, and-S
parameters).Note: Be sure you need SSL before using this option. SSL incurs more or less heavy performance penalties, depending on resources and load. If specified, the connection does not reuse the SSL session ID when reconnecting to the same SSL-enabled server (either a Web server with HTTPS or an SSL-enabled AppServer). If specified, turns off host verification for an SSL-enabled connection, either using HTTPS with the AIA or using a direct connection to an SSL-enabled AppServer. 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. A text file containing any of the other AppServer connection parameters described in this table or
Table 71. If this file contains any other OpenEdge startup parameters, the method ignores them. Indicates that the client would like to employ the AppServer Keepalive protocol on this connection, if supported and enabled by the AppServer. To enable the protocol, specify theallowServerASK
value forcapstr
. To disable the protocol, specifydenyServerASK
.The default value isallowServerASK
.The absence of this property indicates that the default value for the ServerASK protocol will be used on this connection. An HTTP (or HTTPS-based) URL to an AIA (for an Internet-secure AppServer connection) or an AppServer-based URL (with or without SSL tunneling for an SSL-enabled AppServer connection). For more information, see the sections on connecting to an AppServer using a URL in OpenEdge Application Server: Developing AppServer Applications.Note: Be sure you need SSL (either, and especially both, an HTTPS or SSL-enabled AppServer) before using this option. SSL at any point in a networked application incurs more or less heavy performance penalties, depending on resources and load.
1Previous versions of the AppServer allow you to include a network protocol using the-N
parameter, which must always specifyTCP
. 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.Table 71 describes connection parameters for specifying and managing the session model of the connection.
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
]If an error occurs while executing the CONNECT( ) method, the method returns FALSE. Otherwise, it returns TRUE. An error can occur if:
- The server handle is invalid.
- One of the parameters contains an invalid value.
- One of the values specified in the
connection-parms
parameter is invalid.- The Name Server cannot be located.
- The specified Application Service is not registered to a NameServer.
- The client application cannot connect to the AppServer selected by the NameServer.
- The AppServer selected by the NameServer cannot allocate a connection for the client application.
- The AppServer executes a Connect procedure that terminates with a STOP condition, a QUIT condition, or after executing a RETURN ERROR statement. For more information on Connect procedures, see OpenEdge Application Server: Developing AppServer Applications.
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.
OpenEdge Release 10.2B
|