Salesforce

What are the steps to create multiple Applications inside one PAS for OpenEdge instance?

« Go Back

Information

 
TitleWhat are the steps to create multiple Applications inside one PAS for OpenEdge instance?
URL NameWhat-are-the-steps-to-create-multiple-Applications-inside-one-PAS-for-OpenEdge-instance
Article Number000111664
EnvironmentProduct: OpenEdge
Version: 11.6.x, 11.7.x, 12.x
OS: All supported platforms
Other: PASOE
Question/Problem Description
What are the steps to create multiple Applications inside one PAS for OpenEdge instance?

USE-CASES:
  • More than one ABL Application in the same PASOE instance is required to support different database connections, propath and event procedures
  • An instance serves one webapp to handle APSV traffic only and another for WEB/REST/SOAP clients
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution

Since OpenEdge 11.6, PAS for OpenEdge can deploy multiple WebApplications and multiple ABL Applications. Both are two different things.

  1. WebApplications refer to named OEABL WebApplications.
  2. ABL Applications refer to a group of OEABL WebApplications that share same PROPATH, database, event procedures, etc.
  • Each ABL Application has a Session-Manager starts its own Multi-Session Agent.
  • Each ABL Application is required to have a minimum of one web application that interfaces clients to the applicaton's business logic. 
  • By default, there will be just only one ABL Application and it will be with the name of the PASOE instance (eg: oepas1)

Consider the following WebApplications: OEABL1, OEABL2, OEABL3, OEABL4

The first two WebApplications (OEABL1, OEABL2) share the same database and event procedures, which can be done by grouping them as one ABL Application (ABLApp1). This can be done while deploying the Web Application:

$   tcman deploy OEABL1 ABLApp1
$   tcman deploy OEABL2 ABLApp1

To deploy the other two OEABL Web Applications (OEABL3, OEABL4) which share the same database and event procedures, group them as another ABL Application (ABLApp2).

$   tcman deploy OEABL3 ABLApp2
$   tcman deploy OEABL4 ABLApp2

The ABL Application (ABLApp1 ABLApp2) is simply a logical binding of Web Applications, there won't be any WebApp or folders with these names.

Once the Web Applications with ABL Application names are deployed, $CATALINA_BASE\conf\openedge.properties is updated:

  • ABL Applications are listed in the [Appserver] section:

[AppServer]
   applications=ABLApp1,
ABLApp2

  • The mapping of the webapps under the corresponding ABL App:
[ABLApp1]
    webApps=OEABL1,OEABL2

[
ABLApp2]
    webApps=OEABL3,OEABL4
  • Unique Session configuration per ABL Application configured:  databases connections, PROPATH, event procedures, number of PASOE Agents, otherwise populated from the parent [AppServer.SessMgr] Section.

[AppServer.SessMgr.ABLApp1]
    agentStartupParam=-T "${catalina.base}/temp" -db sports2020 -S 8787    
    agentLogFile=${catalina.base}/logs/ABLApp1.agent.log 
    maxABLSessionsPerAgent=150
    maxAgents=2
    maxConnectionsPerAgent=150
    numInitialAgents=1
...
[AppServer.SessMgr.
ABLApp2
...
    agentLogEntryTypes=ASPlumbing,DB.Connects,4GLTrace,UBNET,UBS,UBC 
    agentLogFile=${catalina.base}/logs/ABLApp2.agent.log 
    agentStartupParam=-T "${catalina.base}/temp" -db sports2020 -S 39639
    agentLoggingLevel=4
    maxABLSessionsPerAgent=3
    maxAgents=1
    maxConnectionsPerAgent=3
    numInitialAgents=1
    idleResourceTimeout=15000
    idleConnectionTimeout=30000
...

Practical example:

To create a variety of applications on a single instance of PASOE assigning to each application a different database connection:

1) CATALINA_HOME: Create a PASOE instance called: oepas40

$  cd C:\dlc\servers\pasoe\bin 
$  tcman create -Z dev -f -p 8840 -P 8841 -s 8842 c:\wrk\oepas40

2)  Deploy the oeabl.war
a) $CATALINA_BASE: Create two webapps (OEABL1 and OEABL2) within the ABL Application - ABLApp1:
              
$   cd C:\wrk\oepas40\bin
$   tcman deploy -a OEABL1 %DLC%\servers\pasoe\extras\oeabl.war ABLApp1
$   tcman deploy -a OEABL2 %DLC%\servers\pasoe\extras\oeabl.war ABLApp1

b) $CATALINA_BASE: Create two webapps (OEABL3 and OEABL4) within the Application ABL - ABLApp2:
        
$   cd C:\wrk\oepas40\bin
$   tcman deploy -a OEABL3 %DLC%\servers\pasoe\extras\oeabl.war ABLApp2
$   tcman deploy -a OEABL4 %DLC%\servers\pasoe\extras\oeabl.war ABLApp2
 

3. Configure the database connections details in: $CATALINA_BASE\conf\openedge.properties :

[AppServer]
allowRuntimeUpdates=1
applications=oepas40,ABLApp1,ABLApp2

[AppServer.SessMgr.ABLApp1]
agentStartupParam=-T "${catalina.base}/temp" -db myApp1DB -S 5745
agentLogEntryTypes=ASPlumbing,DB.Connects
agentLogFile=${catalina.base}/logs/ABLApp1.agent.log

[AppServer.SessMgr.ABLApp2]
agentStartupParam=-T "${catalina.base}/temp" -db myApp2DB -S 5755
agentLogEntryTypes=ASPlumbing,DB.Connects
agentLogFile=${catalina.base}/logs/ABLApp2.agent.log

5. Start the new PASOE instance oepas40:
         
$    pasman pasoestart -I oepas40 -restart
$    pasman list -I oepas40 -u tomcat:tomcat
/:running:0:ROOT
/OEABL1:running:0:OEABL1
/OEABL2:running:0:OEABL2
/OEABL3:running:0:OEABL3
/OEABL4:running:0:OEABL4

Test the call:

First place the following server1.p program in the instance's PROPATH configured in the openedge.properties file, for example: C:\wrk\oepas40\openedge
/* Server1.p */
DEFINE INPUT PARAM customerNumber AS INTEGER.
DEFINE OUTPUT PARAM customerName AS CHAR.

FIND FIRST customer WHERE custNum = customerNumber NO-LOCK NO-ERROR.
IF AVAILABLE customer
   THEN customerName = Name.
   ELSE customerName = "No record".

MESSAGE "CustomerName = " customerName SKIP.
Run the following from an ABL Client:
/* Define Local Variables */

DEFINE VARIABLE appHandle AS HANDLE.
DEFINE VARIABLE outName AS CHARACTER.
DEFINE VARIABLE cnctParam AS CHARACTER.
DEFINE VARIABLE ret AS LOGICAL.
DEFINE VARIABLE inNum AS INTEGER.

/* Hardcode the customer number */
inNum=1.

CREATE SERVER appHandle.

/* CONNECT TO: OEABL1 of ABLApp1 that is connected to myApp1DB */
cnctParam = "-URL http://localhost:8840/OEABL1/apsv -sessionModel Session-Managed".

/* CONNECT TO: OEABL3 of ABLApp2 that is connected to myApp2DB */
/* cnctParam = "-URL http://<ip>:8840/OEABL3/apsv -sessionModel Session-Managed". */

ret = appHandle:CONNECT(cnctParam).

/* The Application code Server1.p provided is found in the openedge.properties PROPATH */
IF (ret) THEN DO:
   RUN Server1.p ON appHandle (INPUT inNum, OUTPUT outName).
   DISPLAY "Customer Name: " outName FORMAT "x(40)" SKIP.
   appHandle:DISCONNECT().
END.

 
Workaround
Notes
Keyword Phrase
Last Modified Date11/2/2021 3:07 PM

Powered by