Separating enterprise beans in a workload

You can use the normal workload management workload definition commands to isolate the execution of enterprise beans to specific CorbaServers in specific regions.

To do this, you must associate a bean name with a CICS® transaction, so that workload management can route that transaction to a predetermined CICS region.

You also need a larger definition set than for simple enterprise bean workload balancing. As well as a workload specification to control the workload operation, you need sets of workload management definitions and transaction group definitions beneath it to implement the bean separation.

Using the workload balancing definition set described in Balancing an enterprise bean workload as a starting point, add the following definitions to it:

  1. Copy the definition of the CIRP transaction that you created for workload balancing under a different transaction name for each bean that you wish to be separated, in the listener and all the AORs.

    For example, if you wish to separate three beans (Alpha, Beta and Gamma), copy the current CIRP definition three times as transactions EJB1, EJB2 and EJB3.

  2. When you have completed the transaction definitions, you must define request models for each of the beans to associate the bean name with a transaction. If you specify INTFacetype(BOTH) you need only define one request model for each bean. See the CICS Resource Definition Guide or CICSPlex® System Manager Managing Business Applications for more details.
  3. Install the TCP/IP sevice definition in the listener and the AORs and the request model definitions in the listener.
  4. Install the request processor transaction CIRP as dynamic in the listener region and the CIRP clones (EJB1,EJB2 and EJB3) in the listener and the AORs.
  5. Create TRANGRP definitions to isolate the CICS transactions:
    Figure 47. Creating a TRANGRP definition
    ------------------------ Create Trangroup for EYUPLX01 -------------------------
     COMMAND ===>                                                                   
                                                                                    
      Trangroup name           EJBTRGP1                                             
      Description         ===> Group for Alpha Bean transid                         
                                                                                    
      Status              ===> ACTIVE     Transaction Group Status                  
                                      (ACTIVE,DORMANT)                              
      Match Key           ===> USERID     Primary WLMDEF search criterion           
                                      (USERID,LUNAME)                               
      Affinity Relation   ===>            Optional affinity relation may be:        
                                      (USERID,LUNAME,GLOBAL,BAPPL)                  
      Affinity Lifetime   ===>            Optional affinity lifetime may be:        
                                      (SIGNON,LOGON,PCONV,DELIMIT,SYSTEM,PERMANENT, 
                                       ACTIVITY,PROCESS)                            
      Create Affinity     ===> N/A        Create Auto Affinity (YES, NO, N/A)       
      Event Name          ===>            RTADEF/STATDEF or generic                 
                                                                                    
      Abend Health        ===> 0          Target ABEND Health Factor (0 - 99)       
      Abend Load          ===> 0          Target ABEND Load Factor (0 - 99)         
                                                                                    
     Press ENTER to create Trangroup.                                               
     Type END or CANCEL to cancel without creating. 

    Note that CICSPlex SM cannot manage any logical affinities that may exist between enterprise beans, so ensure that Affinity Relation and Affinity Lifetime are left blank and Create Affinity is N/A. (Any values specified here will be ignored by CICSPlex SM affinity processing). Repeat this definition twice for TRANGRPs EJBTRGP2 and EJBTRGP3. From the resultant TRANGRP list, issue the ADD prefix command against transaction group EJBTRGRP1 and add transaction EJB1 to it.

    Figure 48. Adding transaction EJB1 to group EJBTRGRP1
     ------------------ Add Transaction to Trangroup for EYUPLX01 ------------------
     COMMAND  ===>
     
      Trangroup               EJBTRGP1
     
          Transaction     PCONV Mode        Error
     ===> EJB1            ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     ===>                 ===>
     
     
    Press Enter to add Transaction to Trangroup.
    Type END or CANCEL to cancel without adding.

    Repeat this to add transaction EJB2 to TRANGRP EJBTRGP2 and transaction EJB3 to TRANGRP EJBTRGP3.

  6. Using the WLMDEF command, create a workload definition for each of the transactions that is to be separated.
    Figure 49. Creating a workload definition
     ----------------------- Create Workload Definition for EYUPLX01 ---------------
     COMMAND  ===>
     
      Definition Name  ===>EJBWDEF1
      Description      ===> Alpha Bean
     
      Trangroup Name   ===> EJBTRGP1           Specific Trangroup, Generic, or Blank
      Terminal Luname  ===> *              Specific or pattern Luname
      User ID          ===> *              Specific or pattern Userid
      Process Type     ===> *              Specific or pattern Process Type
      Target Scope     ===> CICSPA01       CICS System, Group, or Generic
     
    Press Enter to create definition.
    Type END or CANCEL to cancel without creating.

    This definition associates the transactions in group EJBTRGP1 (in this case just the EJB1 transaction) with a specific scope. Repeat this definition twice to separate TRANGRP EJBTRGP2 to MAS CICSPA02 and TRANGRP EJBTRGP3 to CICSPA03. You must now create a WLMGROUP to allow the association of the WLMDEFs to the WLMSPEC. CREate one named EJBGRP1 and ADD WLMDEFs EJBWDEF1, EJBWDEF2 and EJBWDEF3 to it.

  7. Create the workload management specification (WLMSPEC).
    Figure 50. Updating a workload specification for enterprise bean separation
    ---------------------- Update WLM Specification for EYUPLX01 -------------------
    COMMAND ===>                                                                    
                                                                                    
     WLM Spec Name            EJBSPEC2                                              
     Description         ===> Separated EJB Workload                                
                                                                                    
     Affinity Relation   ===>            Default Affinity Relation                  
                                 (USERID, LUNAME, GLOBAL, BAPPL)                    
     Affinity Lifetime   ===>            Default Affinity Lifetime                  
                                 (SIGNON, LOGON, SYSTEM, PERMANENT, PCONV, DELIMIT, 
                                  ACTIVITY, PROCESS)                                
     Match Key           ===> USERID     Default Primary search criteria            
                                 (USERID, LUNAME)                                   
     Create Affinity     ===> N/A        Create auto affinity (YES, NO, N/A)        
     Target Scope        ===> EJBCSG02   Default CICS System, Group or Generic      
                                                                                    
     Event Name          ===>            RTADEF, STATDEF or Generic                 
                                                                                    
     Abend Health        ===> 0          Target ABEND Health Factor (0 - 99)        
     Abend Load          ===> 0          Target ABEND Load Factor (0 - 99)          
     Algorithm Type      ===> QUEUE      Algorithm Type (GOAL, QUEUE)               
                                                                                    
    Press ENTER to update the WLM Specification.                                    
    Type END or CANCEL to cancel without updating.
  8. From the WLMGROUP view use the ADD command to add EJBGRP1 to the workload specification you have just defined. You can verify the management definition hierarchy by issuing a MAP command against this WLMSPEC.
    Figure 51. Map of WLMSPEC showing workload management definition hierarchy
     -------------------- MAP of WLMSPEC EJBSPEC2 ----------------- Row 1 of 3       
     COMMAND ===>                                                             
     WLMSPEC      WLMGROUP     WLMDEF       TRANGRP                                                                                     
     --------     --------     --------     --------                                                                                    
     EJBSPEC2 --- EJBGRP1  -+- EJB1     --- EJB1                                                                                        
                            |- EJB2     --- EJB2                                                                                        
                            +- EJB3     --- EJB3                                                                                        
     -------------------------- End Of Map -----------------------------------
  9. Add the WLMSPEC to the system group comprising all MASs, that is the listener and the AORs. The target scope is still the group which consists of the AOR MASs only. You can use the WLMSCOPE comand to view the workload specification.
    Figure 52. WLMSCOPE command output
    W1 =WLMSCOPE==========EYUPLX01=ALLMAS===02/02/2001=11:06:24====CPSM========5===
     CMD WLM      Scope    Scope    Scope    Scope    Update                       
     --- Spec---- Name---- Type---- Mode---- Link---- Option--                     
         EJBSPEC2 EJBCSG01 SYSGROUP                                                
         EJBSPEC2 CICSPA01  CICSSYS  INHERIT  EJBCSG01                             
         EJBSPEC2 CICSPA02  CICSSYS  INHERIT  EJBCSG01                             
         EJBSPEC2 CICSPA03  CICSSYS  INHERIT  EJBCSG01                             
         EJBSPEC2 CICSPT01  CICSSYS  INHERIT  EJBCSG01  
  10. When all of the MASs are restarted, ensure that each MAS confirms:
    EYUNL0160I xxxxxxxx Workload registration complete

    where xxxxxxxx is the corresponding MAS name. At that point the workload management environment should be ready to separate execution of enterprise bean Alpha to MAS CICSPA01, Beta bean to MAS CICSPA02 and Gamma bean to MAS CICSPA03. Use the command LOCTRAN EJB* to inspect the use counts for each transaction and expect to see them incremented each time one of these beans is driven from your client.

You may, if you wish, introduce more granularity into the separation of your enterprise beans by separating them by bean method calls. Thus for example you can send Bean1.method1() to CICS1 and Bean1.method2() to CICS2. To do this you must define your transactions, copying the CIRP transaction definition as described earlier. For each of the methods to be separated you need to define a request model with INTFacetype(REMOTE) and associate one of the transactions with it. You also need a request model with INTFacetype(HOME) or (BOTH) to handle calls to the local region and direct them to the appropriate AOR. Then continue with the instructions for separation of enterprise beans given earlier

[[ Contents Previous Page | Next Page Index ]]