Kbase P59: How to set up a Progress AppServer in Version 9.x
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/10/2008 |
|
Status: Verified
GOAL:
How to set up a Progress AppServer in Version 9.x
FACT(s) (Environment):
Progress 9.x
All Supported Operating Systems
OpenEdge Server Technology Category: AppServer
FIX:
Take the following steps to set up the AppServer:
1) To test a remote procedure that runs on a UNIX machine from a Windows 4GL client:
NOTE: If you have the Progress Explorer, you do not need to implement changes within the ubroker.properties file. This file becomes updated when you make changes within the Progress Explorer. For most UNIX customers, if you do not have the GUI utility "Progress Explorer", all changes must be implemented within the ubroker.properties file.
A) Ensure the AdminServer is running.
If it is not running, use the proadsv -start command to start it.
B) Start the NameServer.
In the ubroker.properties file, there is a default NameServer already specified. If you need to add or change any of the default properties, you must do so within the file.
nsman -name NS1 -start
NOTE: -name is the name of the default NameServer.
C) Start the AppServer.
Again, in the ubroker.properties file there is a default AppServer already specified. If you need to add or change any of the default properties, you must do so within the file.
asbman -name asbroker1 -start
NOTE: -name is the name of the default AppServer.
2) Specify the absolute path for the database that you are connecting to.
This can be done within the ubroker.properties file under [UBroker.AS] srvrStartupParm=
Remember if you are starting the database as a single user, enter the -1 here.
3) Place any remote procedures to be run by the AppServer on the UNIX machine where the AppServer broker was started and compile them.
For this example, the following code (raiselim.p) to increase all customer credit limits was placed on misdev:
/* raiselim.p */
FOR EACH customer:
ASSIGN customer.credit-limit = customer.credit-limit + 100.
END.
4) Connect to the Windows 4GL client.
The application code that runs on the Windows 4GL client creates an AppServer on the UNIX machine.
5) Call the remote procedure to be run on the UNIX machine.
For this example, the following code calls the remote procedure raiselim.p:
DEFINE VARIABLE servhdl AS HANDLE NO-UNDO.
DEFINE VARIABLE ret AS LOGICAL NO-UNDO.
CREATE SERVER servhdl.
ASSIGN ret = servhdl:CONNECT("-S 5162 -H misdev -App asbroker1").
The -H = host where the NameServer resides (and is running). The -S = NameServer Port (by default the port is 5162). You do not need the -N. The -App = specific AppServer name. This can be left off completely since it goes to the default AppServer if one exists.
IF ret THEN
RUN raiselim.p ON SERVER servhdl TRANSACTION DISTINCT.
ASSIGN ret = servhdl:DISCONNECT().
DELETE OBJECT servhdl.
The application code can also run on a UNIX 4GL client as it appears above to create and connect to an AppServer on a remote UNIX machine.