2 1 4 3 Optimize Java Service Manager OPTJSM

LANSA Integrator

2.1.4.3 Optimize Java Service Manager (OPTJSM)

It is no longer necessary to optimize JAR files. The new IBM Technology for Java JDKs do not use these optimized programs and the Classic JDKs have improved to such a point that these optimized programs do not offer much benefit.

This command will create optimized Java objects using .jar files located in the jar subdirectory and CLASS files located in the classes subdirectory. Optimization converts Java byte code into a hidden 64-bit RISC service program for the IBM i. This process may take several hours depending upon the speed of your IBM i server and the .jar file to be processed.

This command uses the i5/OS CRTJVAPGM command.

When you select the option to Optimize Java Service Manager, you will be prompted to enter the following:

INSTANCE

The instance defaults to a value of *DEFAULT. This is the recommended value. The default instance is defined in the JSMMGRDTA data area. This value can be changed using 2.1.4.6 Change Default Instance (CHGJSMDFT).

OPTIMIZE

The option defaults to a value of 40. Valid values are 10, 20, 30, 40.

For more information about the OPTIMIZE keyword refer to the i5/OS CRTJVAPGM command.

JAR

The option defaults to *YES. Valid values are *NO, *YES. This indicates whether the files in the instance jar and endorsed subdirectories should be optimized.

CLASS

The option defaults to *YES. Valid values are *NO, *YES. This indicates whether the files in the instance classes subdirectory should be optimized.

REPLACE

The option defaults to *NO. Valid values include *NO, *YES. This indicates that an existing optimized program should be replaced.

For more information about the REPLACE keyword refer to the i5/OS CRTJVAPGM command.

Important: Making Copies of Jar Files

If you make a copy of a .jar file for backup purposes, it is recommended that you do not leave the backup .jar file in the jar subdirectory. For example, before modifying jsm.jar, you copy the jsm.jar to oldjsm.jar in the same jar subdirectory. When the classpath is built using the list of files in the jar subdirectory, the oldjsm.jar will be included and might appear before jsm.jar in classpath. In this case, the old version could still be used, i.e.
classpth = oldjsm.jar;jsm.jar;jsmservice.jar;xerces.jar;xalan.jar....