Use the JVMCCSIZE system initialization parameter to specify the initial size of the shared class cache. The size of the shared class cache determines the number of classes that it can contain. The default size is 24MB. You can change the size of the shared class cache while CICS is running; Adjusting the size of the shared class cache tells you how.
Besides JVMCCSIZE, the shared class cache is mainly defined through the JVM profile that is used for the master JVM that initializes the shared class cache.
The JVM profile for a master JVM is similar to the JVM profile for any other JVM. The CLASSCACHE_MSGLOG option can be specified to name the file for messages from the master JVM (the default is dfhjvmccmsg.log). Some options (for example, the Xdebug option) are not appropriate for a master JVM, and if they are specified in the JVM profile that is used for the master JVM, CICS ignores them. The CICS® System Definition Guide has information about the options that are not appropriate in the JVM profile for a master JVM. As for any other JVM profile, you need to ensure that the settings in the profile are suitable for your system.
The JVM properties file for a master JVM omits most of the system properties that would be specified for a normal JVM, because the master JVM is not used to run Java applications. The only system property that needs to be specified is ibm.jvm.shareable.application.class.path, which you should use to specify the shareable application classes for all the applications that will run in worker JVMs that use the shared class cache. The CICS System Definition Guide has more information about other system properties that you might also want to specify in the JVM properties file for a master JVM.
One important decision to make about the master JVM is whether to define it as a resettable JVM, or as a continuous JVM. (It cannot be defined as a single-use JVM.) How JVMs are reused explains the levels of reusability for JVMs.
The worker JVMs in a CICS region all inherit their level of reusability from the REUSE option specified in the JVM profile for the master JVM in that region. (If you include the REUSE option in the profile for a worker JVM, the option is ignored.) If you specify the option REUSE=RESET or the older option Xresettable=YES in the JVM profile for the master JVM, the master JVM and all the worker JVMs are resettable. If you specify the option REUSE=YES in the JVM profile for the master JVM, the master JVM and all the worker JVMs are continuous. If none of these options is included, CICS assumes that the master JVM is resettable.
If your worker JVMs are continuous JVMs, they have a greater transaction throughput and lower CPU usage than if they are resettable JVMs. 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 Programming for different types of JVM.
You cannot mix resettable worker JVMs and continuous worker JVMs in a CICS region; you need to choose one level of reusability for your worker JVMs. If you have some applications that need to run in a resettable JVM and some that need to run in a continuous JVM, and you want both types to use the shared class cache, then you could set up a master JVM and worker JVMs with either level of reusability in separate CICS regions. If you require both resettable and continuous JVMs in a single CICS region that has a shared class cache, you need to choose which type should be able to use the shared class cache, and which type should be standalone. Single-use JVMs are always standalone JVMs.
By default, the supplied sample JVM profile DFHJVMCC is used for the master JVM that initializes the shared class cache. DFHJVMCC specifies the option REUSE=RESET, so the master JVM and worker JVMs are resettable. You can modify DFHJVMCC to change this setting or other settings in the JVM profile, or you can substitute your own JVM profile. Customizing or creating JVM profiles and JVM properties files tells you how to change a JVM profile or create your own.
If you modify DFHJVMCC, CICS uses the new version of the JVM profile for the master JVM the next time the shared class cache is started. If the shared class cache is already started, and you want to switch to the new version of the JVM profile right away, use the CEMT PERFORM CLASSCACHE RELOAD command (or the equivalent EXEC CICS command) to create a new shared class cache. The master JVM that initializes the new shared class cache will use the new version of the JVM profile.
Use the CEMT INQUIRE CLASSCACHE command (or the equivalent EXEC CICS command) to find out what JVM profile currently applies to the master JVM that initializes the shared class cache.