Updating classes or JAR files in the shared class cache

The shared class cache contains: The structure of a JVM has more details about these classes.

If any of these classes or JAR files change, you need to update them in the shared class cache, because they are not automatically reloaded. This does not apply to classes loaded by the nonshareable class loader, that is, classes on the standard class path specified by the CLASSPATH option in the JVM profile, because they are loaded into the individual worker JVMs.

If you need to update any of the classes or JAR files in the shared class cache, first update the classes or files on your system. Next, phase out the old shared class cache and create a new shared class cache. The new shared class cache will contain the new classes or JAR files that you have placed on your system.

You can phase out the old shared class cache using one of three commands, depending on how you want the new shared class cache to be introduced. Once you have entered one of these commands, either CICS will create a new shared class automatically, or you will need to create a new shared class cache manually. The three commands that you can use are listed here, with a description of what happens when you use each command, and what you need to do next. Read the list to identify the command that is most appropriate for your situation. Table 1, following the list, summarizes when you should use each command.

The commands you can use to update classes or JAR files in the shared class cache are:
Table 1 summarizes when you should use each command to update classes or JAR files in the shared class cache.
Table 1. Updating classes or JARs in the shared class cache
Situation Suitable command
  • You want to allow new JVMs requiring the shared class cache to use the old classes or JARs until the new shared class cache is ready.
  • You have no standalone JVMs, or you do not want to update this type of JVM.
CEMT PERFORM CLASSCACHE RELOAD (or the equivalent EXEC CICS command)
  • You want to ensure that all new JVMs requiring the shared class cache from now on must wait until the new shared class cache is ready, and not use the old classes or JARs.
  • You have no standalone JVMs, or you do not want to update this type of JVM.
CEMT PERFORM CLASSCACHE PHASEOUT, PURGE or FORCEPURGE (or the equivalent EXEC CICS command), using the AUTOSTARTST option to enable autostart if it is not already enabled
  • You want to update the classes or JARs in standalone JVMs, as well as in the shared class cache.
CEMT SET JVMPOOL PHASEOUT, PURGE or FORCEPURGE (or the equivalent EXEC CICS command), followed as soon as possible by CEMT PERFORM CLASSCACHE START (unless autostart is enabled, in which case you do not need to use CEMT PERFORM CLASSCACHE START)

You can use the CEMT INQUIRE CLASSCACHE command (or the equivalent EXEC CICS command) to report on any old shared class caches in your system (OLDCACHES), and the number of JVMs that are dependent on them (PHASINGOUT). If you want to check the status of the JVMs themselves, including standalone JVMs, you can use the CEMT INQUIRE JVM command (or the equivalent EXEC CICS command) to report on all the JVMs in the JVM pool, including those that are being phased out. (The INQUIRE JVM command does not find the master JVM that initializes the shared class cache. It only finds worker JVMs and standalone JVMs.)