Kbase P2859: How To Modify the AppServer Partition Information at Runtime
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/21/2003 |
|
Status: Verified
GOAL:
How to modify the AppServer Partition information read from appsrvtt.d at runtime.
GOAL:
How to modify the AppServer Partition to switch between the Test environment and the Production environment.
FACT(s) (Environment):
Progress 9.x
FIX:
1) Extract the following files from the Progress library, adecomm.pl, located in the %DLC%\src directory, then place them in their own adecomm directory from your client application working directory.
adecomm\as-util.w
adecomm\appsrvtt.i
adecomm\appserv.i
adecomm\_adetool.i (for using with AppBuilder)
2) Include the appsrvtt.i in your source code (.w or .p). This will allow you to reference the temp table. If you then place a button on a window, and ON CHOOSE of this button, place the following code, it finds the first occurrence of asbroker1 and then changes the Host and Service. These details are then used for the remainder of the session.
DEFINE VARIABLE vPartition AS CHARACTER NO-UNDO.
DEFINE VARIABLE vHost AS CHARACTER NO-UNDO.
DEFINE VARIABLE vService AS CHARACTER NO-UNDO.
FIND FIRST AppSrv-TT WHERE AppSrv-TT.Partition = "asbroker1" NO-ERROR.
IF AVAILABLE AppSrv-TT THEN DO:
ASSIGN
vPartition = AppSrv-TT.Partition
vHost = AppSrv-TT.Host
vService = Appsrv-TT.Service.
MESSAGE vPartition vHost vService VIEW-AS ALERT-BOX INFO BUTTONS OK.
ASSIGN
AppSrv-TT.Partition = "asbroker1"
Appsrv-TT.Host = "pcsorour2"
Appsrv-TT.Service = "5163".
END. /* end if avail appsrv-tt*/