Java execution modes

Because all WebSphere components (servlets, JSPs, and enterprise beans) are loaded by an application server classloader, application classloader, and application module classloader, WebSphere components do not use the direct execution (DE) capabilities of the OS/400 JVM. For more information on these classloaders, see Application server classloaders and Application classloaders. Java program (JVAPGM) objects are not used when running WebSphere component code. Classes loaded by a JVM classloader or the WebSphere extension classloader use DE capabilities and JVAPGM objects. For more information on these classloaders, see JVM classloaders and WebSphere extensions classloader. Java user classloader caching can be used to allow WebSphere components to use permanent JVAPGM objects and DE capabilities, though this is not necessary for the vast majority of applications. For more information on Java user classloader caching, see Java cache for user classloaders.

By default, application servers run with the Java system property java.compiler=jitc_de. The jitc_de value means that just-in-time compilation is done for any Java object for which a JVAPGM object does not exist (or cannot be used, in the case of WebSphere application classloaders). This setting provides the best overall performance.

It is possible to change application servers to use direct execution instead of JIT mode. Doing so results in longer startup times, because creation of the JVAPGM takes longer than creation of the JIT stubs. Due to performance improvements in the JIT run time, performance of direct execution even after JVAPGM creation is probably slower also. To make an application server use direct execution for all classes, perform these steps:

  1. In the administrative console select Servers and then Application Servers.
  2. Click on the application server you want to modify.
  3. In the Additional properties section, click Process Definition.
  4. In the Additional properties section, click Java Virtual machine.
  5. In the Additional properties section, click Custom Properties.
  6. Click New to add a property. Add these properties:

    • Property java.compiler with value NONE
    • Property os400.defineClass.optLevel with a value that indicates the optimization level desired (values are 0 for interpret, and 10, 20, 30, or 40 for direct execution optimization levels)

It is also possible to have an application server use the interpreter only (no JIT). To make an application server use full interpretation for all WebSphere components, add Java system property java.compiler with value NONE.