Try OpenEdge Now
skip to main content
Java Open Clients
Connecting to an AppServer : Establishing the connection
 

Establishing the connection

To establish a connection to an AppServer, you must instantiate an AppObject. You may create an AppObject using one of the four available constructors, described in this section.
The following constructor establishes an AppServer connection, with the AppServer information specified in the Connection object (connectObj):
public AppObject(com.progress.open4gl.javaproxy.Connection connectObj)
Where AppObject is the name of the AppObject as defined in ProxyGen.
A Connection object can be instantiated with one of the constructors documented in Connection class.
The following constructor establishes an AppServer connection, with the specified AppServer connection information url, user ID, password, and information required by the AppServer application at connection time:
public AppObject(String url, String userid, String password,
     String appserver-info)
Where AppObject is the name of the AppObject as defined in ProxyGen.
For more information on the AppServer URL connection parameter format and default connection information, see the sections on connecting to an AppServer using a URL in OpenEdge Application Server: Developing AppServer Applications.
The following constructor establishes an AppServer connection, with the specified user ID, password, and information required by the AppServer application at connection time:
public AppObject(String userid, String password, String appserver-info)
Where AppObject is the name of the AppObject as defined in ProxyGen.
The above constructor uses default AppServer connection information. This defaults the URL to AppServer://localhost:5162/appService, where appService is the AppService Name setting specified in the general settings of the ProxyGen Generate Proxies dialog box.
The following constructor establishes an AppServer connection, with no specified AppServer information:
public AppObject()
Where AppObject is the name of the AppObject as defined in ProxyGen.
The constructor above uses default AppServer connection information. This defaults the URL to AppServer://localhost:5162/appService, where appService is the AppService Name setting specified in the general settings of the ProxyGen Generate Proxies dialog box.
Also see the information on connecting to an AppServer in OpenEdge Development: Open Client Introduction and Programming.
* Returning a user defined string to the client from the AppServer connection procedure
* Supported AppServer modes
* Releasing a session-free Connection object