Choosing a JVM profile and JVM properties file

To help you get started, CICS supplies several sample JVM profiles and JVM properties files. Table 1 describes these files.
Table 1. CICS-supplied sample JVM profiles and JVM properties files
JVM profile Associated JVM properties file Comments
DFHJVMPR dfjjvmpr. props Profile DFHJVMPR is the default if no JVM profile is specified in a Java program's resource definition. It specifies REUSE=RESET, which causes CICS to reset the JVM and make it available for reuse for another task, after the JVM finishes running each Java program. JVMs created with the profile DFHJVMPR do not use the shared class cache (the profile specifies CLASSCACHE=NO). So JVMs created with DFHJVMPR are resettable standalone JVMs.

You can specify this profile for JVMs that are to be used by your own applications. DFHJVMPR and DFHJVMPC are the recommended profiles for defining your own JVMs that are to be used by enterprise beans.

DFHJVMPR is the default if no other JVM profile is specified, and it is used for sample programs, so make sure that it is set up correctly for your CICS region.

DFHJVMPC dfjjvmpc.props DFHJVMPC is similar to the default JVM profile, DFHJVMPR, except that it specifies CLASSCACHE=YES, and omits the options that are not required when CLASSCACHE=YES is specified. JVMs with this profile do use the shared class cache, so they are resettable worker JVMs. This JVM profile is compatible with the shared class cache defined by DFHJVMCC.

You can specify this profile for JVMs that are to be used by your own applications. DFHJVMPR and DFHJVMPC are the recommended profiles for defining your own JVMs that are to be used by enterprise beans. Single-use JVMs, and JVMs that are configured for debug, cannot use the shared class cache.

DFHJVMPS dfjjvmps. props DFHJVMPS specifies REUSE=NO, which causes CICS to make each JVM available for use by a single Java program only— it is a single-use JVM. JVMs created with the profile DFHJVMPS do not use the shared class cache.

You can specify this profile for JVMs that are to be used by your own applications. However, this profile is not recommended for JVMs that are to be used by enterprise beans. DFHJVMPS is only beneficial for Java applications that were originally designed to run in a single-use JVM, and have not been made suitable for running in a JVM that is intended for reuse. How JVMs are reused has more information about this.

DFHJVMCC dfjjvmcc.props DFHJVMCC is the default profile used to configure the master JVM that initializes the shared class cache. It defines a shared class cache suitable for use by JVMs in which enterprise beans can be executed. This JVM profile is the default for the JVMCCPROFILE system initialization parameter.Setting up the shared class cache has more information about this.

Do not specify this profile for JVMs that are to be used by your own applications.

DFHJVMCD (reserved for the use of CICS) dfjjvmcd.props CICS-supplied system programs have their own JVM profile, DFHJVMCD, to make them independent of any changes you make to the default JVM profile DFHJVMPR. In particular, the PROGRAM resource definition for the default request processor program, DFJIIRP, specifies DFHJVMCD. The CICS-supplied default is that JVMs created with the profile DFHJVMCD do not use the shared class cache (the profile specifies CLASSCACHE=NO), but you can change that. Start of changeDFHJVMCD also specifies REUSE=YES, which gives a continuous JVM, but you can change that as well. End of change

Do not specify this profile in PROGRAM resource definitions that you set up for your own applications. However, because DFHJVMCD is used by CICS-supplied system programs, you do need to make sure that it is set up correctly for your CICS region. Only make the changes to DFHJVMCD that are necessary to run applications, as described in Customizing or creating JVM profiles and JVM properties files.

The sample files are defined with JVMPROPS, LIBPATH, CLASSPATH, and WORK_DIR parameters that use the symbols &CICS_DIRECTORY, &JAVA_HOME, and &APPLID. As part of the CICS installation process, you will have run the DFHIJVMJ job, which is described in the CICS® Transaction Server for z/OS® Installation Guide. The DFHIJVMJ job substitutes your own values for the symbol names, and produces sample files that are tailored for your system.

If you are following a procedure to set up IIOP support or support for enterprise beans, and you want to use the default request processor transaction CIRP and the default request processor program DFJIIRP to process requests for CORBA stateless objects or enterprise beans, then you will be using the JVM profile DFHJVMCD. When you have specific CORBA stateless objects or enterprise beans to run, you will need to add classes required by your CORBA stateless objects or enterprise beans to the appropriate class path for DFHJVMCD, as described in Enabling applications to use a JVM. If you do not want to customize this JVM profile at this point, and you are sure that the settings in the profile are suitable for your system, you can return to the procedure Setting up the host system for IIOP or Setting up an EJB server. If you think that you might want to customize DFHJVMCD, or if you want to select a JVM profile for an alternative request processor program definition that you plan to set up, carry on reading this section.

If you are setting up standard Java programs or your own request processor program definition, in many cases you may find that you can use the sample JVM profiles and JVM properties files with most of the options that are already set in them, and just add your own application classes to the class paths. Simply select the appropriate JVM profile for your application's needs by using the information in Table 1. The JVM profile that you select references the relevant sample JVM properties file. The two main questions to ask are:
  1. Whether you want the JVM to use the shared class cache (DFHJVMPC) or to run independently as a standalone JVM (DFHJVMPR). The shared class cache explains the advantages for JVMs in using the shared class cache, and what the implications are. Single-use JVMs and JVMs that are configured for debug cannot use the shared class cache. Because DFHJVMPR (where JVMs do not use the shared class cache) is the default, if you do want JVMs to use the shared class cache, ensure that you specify DFHJVMPC as the JVM profile for those JVMs.
  2. Whether you want CICS to attempt to reset the JVM after it finishes running each Java program (a resettable JVM), or to make it available for reuse without resetting it (a continuous JVM), or to destroy the JVM without attempting to reset it (a single-use JVM).Setting a level of reusability explains how this can be specified.
In some cases, you might find that the options in the sample JVM profiles and JVM properties files need to be changed to fit the needs of a particular application, or of your CICS region. Changes that you could make has information about the circumstances in which you might want to make these changes.