Configuring the OpenEdge AppServer agent as a self-service DataServer session
To configure the OpenEdge AppServer agent as a self-service DataServer session:
1. Make sure that the AdminService is running.
Note: For more information on using the PROADSV tool, see the OpenEdge Application Server: Administration guide.
2. Add the following property in the ubroker.properties file underUBroker.AS.asbroker1 section:
srvrStartupParam= -pf "$WRKDIR/conn.pf"
where AS1 is the AppServer.
3. Start the Application Server broker using the following command:
asbman -i asbroker1 -start
.
Note: For more information on using asbman commands and its parameters, refer to the OpenEdge Application Server: Administration.
4. Open an ABL session and execute the client.p to connect to the self-service DataServer through an OpenEdge Appserver instance as shown in the following example:
client.p
----------
DEFINE VARIABLE hServer AS HANDLE NO-UNDO.
DEFINE VARIABLE i AS logical.
CREATE SERVER hServer.
/*hServer:CONNECT('-AppService asbroker1 -S 5162 -H <hostname> -nsClientMinPort 5000 -nsClientMaxPort 50100') NO-ERROR.*/
hServer:CONNECT('-AppService asbroker1').
i = hServer:Connected().
message i.
MESSAGE "Error:" ERROR-STATUS:ERROR.
IF ERROR-STATUS:ERROR = FALSE THEN
DO:
RUN server.p ON hServer .
hServer:DISCONNECT().
END.
ELSE
MESSAGE ERROR-STATUS:GET-MESSAGE(1).
DELETE OBJECT hServer NO-ERROR.
output close.
quit.