Defining EJB directory and object store data sets

DFHEJDIR is a file containing a request streams directory that is shared by all the regions (listeners and AORs) in a logical EJB server.

DFHEJOS is a file of passivated stateful session beans. It is shared by all the AORs in the logical EJB server.

The EJB directory and object store data sets are CICS® file-control-managed data sets that require resource definitions in the CSD. Because the data sets have to shared by all the CICS regions that form a logical EJB server, you can define each of them to CICS file control as:

Figure 26 shows an example of the JCL you can use to define an EJB directory data set.

Figure 26. Example JCL to define an EJB directory data set
//EJBDIR   JOB accounting info,,CLASS=A
//DEFGCD   EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
 /*                           */
 /* DEFINE A DIRECTORY        */
 /* DATASET                   */
 /*                           */
 DEFINE CLUSTER(NAME(CICSTS31.CICS.DFHEJDIR)-
          INDEXED-
          LOG(UNDO)-                               1 
          CYL(2 1)-
          VOLUME(volid)-                           2 
          RECORDSIZE( 1017 1017 )-                 3 
          KEYS( 16 0 )-
          FREESPACE ( 10 10 )-
          SHAREOPTIONS( 2 3 ))-
        DATA  (NAME(CICSTS31.CICS.DFHEJDIR.DATA) -
          CONTROLINTERVALSIZE(1024)) -
        INDEX (NAME(CICSTS31.CICS.DFHEJDIR.INDEX))
/*
//*                        

 1  The backout recovery attribute is defined in the ICF catalog so that the data set defined by this job can be used in either RLS or non-RLS mode. For data sets used in RLS mode, the recovery attributes must be defined in the ICF catalog, and they override any that are specified in the CICS file resource definition. The EJB directory data set must be defined as recoverable.

 2  Specify your own value for the VOLUME parameter, or remove it altogether if you are using SMS-managed storage.

 3  The average and maximum record size must both be defined as 1017 bytes.

Note:
You should not need to change any of the definition values shown in Figure 26: DFHEJDIR only contains one record, its control record. However, ensure that run-time settings are specified (such as BUFND, BUFNI and STRNO subparameters on the AMP parameter on the DD statement, or the equivalent in the CICS file resource definition) to support the maximum number of requests that could be active at any one time.

Figure 27 shows an example of the JCL you can use to define an EJB object store.

Figure 27. Example JCL to define an EJB object store data set
//EJBOS    JOB accounting info,,CLASS=A
//DEFGCD   EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
/*                                                    */
/* DEFINE AN OBJECT STORE                             */
/* DATASET                                            */
/*                                                    */
DEFINE CLUSTER(NAME(CICSTS31.CICS.DFHEJOS) -
         INDEXED -
         LOG(NONE) -                           1 
         RECORDS(1000,100) -                   2 
         VOLUME(volid) -                       3 
         RECORDSIZE( 8185 8185 ) -             4 
         KEYS( 16 0 ) -
         FREESPACE ( 10 10 ) -
         SHAREOPTIONS( 2 3 )) -
       DATA  (NAME(CICSTS31.CICS.DFHEJOS.DATA) -
         CONTROLINTERVALSIZE(8192)) -
       INDEX (NAME(CICSTS31.CICS.DFHEJOS.INDEX))
/*
//*                     

 1  The backout recovery attribute is defined in the ICF catalog so that the data set defined by this job can be used in either RLS or non-RLS mode. For data sets used in RLS mode, the recovery attributes must be defined in the ICF catalog, and they override any that are specified in the CICS file resource definition. The EJB object store data set must be defined as non-recoverable.

 2  The number of records that the file can hold. VSAM automatically calculates space requirements.

 3  Specify your own value for the VOLUME parameter, or remove it altogether if you are using SMS-managed storage.

 4  The average and maximum record size are both shown as 8185 bytes in this sample job, but you will need to calculate your own size as described in Determining the object store space requirements.

Determining the object store space requirements

Follow these guidelines when calcuating the size of yoiur object store data set:

  1. Find the average size of a stateful bean. To do this you can write a method that serializes a bean and writes it to a file. The filesize is the size of the bean. Repeat for each bean, and then calculate the average filesize.
    Note:
    The size of the bean depends on what state the bean has. For example, if a stateful bean contains a hashtable populated with 100 KB of non-transient data then the serialized object must also contain this information.
  2. Round the figure at Step 1 up to nearest multiple of 512 bytes (subject to a minimum of 1 024 bytes).
  3. Estimate the maximum number of records, and use this as the primary allocation in the RECORDS parameter ( see  2 ).
  4. Estimate the requirements for the secondary allocation, for example by halving the primary allocation.

    Modify the supplied IDCAMS step in DFHDEFDS to create an object store that meets your needs.

[[ Contents Previous Page | Next Page Index ]]