Enabling JVMs to use the shared class cache

To enable a JVM to be a worker JVM and use the shared class cache, you need to ensure that the JVM profile used by that JVM states CLASSCACHE=YES. If any JVMs in the region cannot share the class cache, because they have an inappropriate level of reusability or because they are being used for problem diagnosis, they need to use a JVM profile that states CLASSCACHE=NO. The EXEC CICS INQUIRE JVMPROFILE command tells you whether a particular JVM profile states CLASSCACHE=YES or CLASSCACHE=NO. (There is no CEMT equivalent for this command.) Setting up JVM profiles and JVM properties files tells you how to select and modify JVM profiles. Enabling applications to use a JVM tells you how to specify the JVM profile that an application requests.

The default JVM profile, DFHJVMPR, states CLASSCACHE=NO. If you use this JVM profile, the JVM does not use the shared class cache, and runs independently as a standalone JVM.

The supplied sample JVM profile DFHJVMPC states CLASSCACHE=YES. It is compatible with the shared class cache that is created by a master JVM with the JVM profile DFHJVMCC. If you want a JVM to use the shared class cache, you can name DFHJVMPC as the JVM profile on the PROGRAM resource definition for the request, or you can name your own JVM profile based on DFHJVMPC that states CLASSCACHE=YES. JVMs created using JVM profiles that state CLASSCACHE=YES are known as worker JVMs.

The JVM profile for CICS-supplied system programs, DFHJVMCD, states CLASSCACHE=NO. This JVM profile is specified by the PROGRAM resource definition for the default request processor program, DFJIIRP. Enterprise bean requests that invoke the CICS-supplied CIRP request processor transaction will therefore use this JVM profile. If you want these enterprise beans to use the shared class cache, change DFHJVMCD to state CLASSCACHE=YES.

If you specify CLASSCACHE=YES in a JVM profile, certain options in the JVM profile and JVM properties file are ignored. If these options are found in the JVM profile or JVM properties file for a worker JVM, CICS does not pass them on to the JVM. If values for these options are required, they are taken from the JVM profile and JVM properties file for the master JVM that initializes the shared class cache. These options are not used in the CICS-supplied sample JVM profile DFHJVMPC. If you have converted another JVM profile to use the shared class cache, you can either remove the options (by commenting out or deletion) from the JVM profile or JVM properties file, or leave them there. The CICS® System Definition Guide tells you what options and system properties are treated in this way.

The options that are ignored for a worker JVM include the REUSE option, which specifies the level of reusability for the JVM. How JVMs are reused explains the levels of reusability for JVMs. Worker JVMs inherit their level of reusability from the master JVM, so they do not need the REUSE option in their JVM profiles. The master JVM and worker JVMs in a CICS region can be resettable or continuous, depending on the REUSE setting in the master JVM profile. If you choose to make your master JVM and worker JVMs into continuous JVMs, you need to note the considerations for programming and for application design which are described in Continuous JVMs (REUSE=YES).

Also among the options that are ignored for a worker JVM are the options that specify the library path (in the JVM profile), the trusted middleware class path (in the JVM profile), and the shareable application class path (in the JVM properties file). These class paths are taken from the values for the master JVM. If you have converted an existing JVM profile to use the shared class cache, you need to ensure that directory paths specified by these options in the JVM profile or its JVM properties file are transferred to the library path, the middleware class path or the shareable application class path for the master JVM. Adding application classes to the class paths for a JVM tells you how to do this.