Kbase P25687: Example of an Appserver application
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  14/01/2009 |
|
Status: Verified
GOAL:
Example of an Appserver application for 9.1X
GOAL:
How to connect with the Appserver 9.1x
GOAL:
How to run a procedure in the AppServer
GOAL:
AppServer test program.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.1x
OpenEdge 10.x
FIX:
To use this test program use the default configuration for the NameServer NS1, and the Appserver broker asbroker1.
Using the Progress Explorer Tool:
1) Create an sports DB and proserve it on port 4444, for example.
2) Click on the AppServer folder and left click on asbroker1 .
3) Go to the asbroker1 properties.
4) Expand the Broker properties and select AppService names List.
5) Make sure that the asbroker1 name is included into the Application service names box.
6) Expand the Agent properties, within the Server startup parameters box type:
-db sports -S 4444
7) Start NS1 by selecting it and clicking on the green triangle at the top of Progress Explorer.
8) Start asbroker1 by selecting it and clicking on the green triangle at the top of Progress Explorer.
The NameServer NS1 default port is 5162, this port will be used to get the connection with the AppServer broker asbroker1.
/* This program will run raiselim.p on the asbroker1 */
DEFINE VARIABLE servhdl AS HANDLE.
DEFINE VARIABLE ret AS LOGICAL.
CREATE SERVER servhdl.
ASSIGN ret = servhdl:CONNECT("-S 5162 -H localhost -AppService asbroker1").
IF ret THEN RUN raiselim.p ON SERVER servhdl TRANSACTION DISTINCT.
ASSIGN ret = servhdl:DISCONNECT().
DELETE OBJECT servhdl.
The program raiselim.p must reside at the host where the Appserver is running.
/* raiselim.p */
FOR EACH customer:
ASSIGN customer.credit-limit = customer.credit-limit + 100.
END.