Run-time support for Java™ program objects and for hot-pooling
(HPJ) is withdrawn in CICS® Transaction Server for z/OS® Version 3 Release 1. Any Java programs that you had processed using
the VisualAge® for Java, Enterprise Edition for OS/390® bytecode
binder (hpj) to run as Java program objects in CICS, must be migrated
to run in a Java Virtual Machine (JVM). To do this:
- Set up the JVM environment, as described in "Setting
up and using JVMs" in Java Applications in CICS.
- Place the class files (with the extension .class) for the Java programs
in directories in HFS where they can be loaded by the JVM. Ensure that CICS has read and execute access to these directories, as described in "Giving CICS regions access to z/OS UNIX System Services
and HFS directories and files" in Java Applications in CICS. In order to create Java program objects, you had to use the javac compiler (or
an equivalent Java compiler, such as VisualAge for Java or WebSphere® Studio Application Developer) to
compile the Java source files into class files, and then use the VisualAge for Java, Enterprise Edition for OS/390 bytecode
binder to compile the class files into Java program objects. If you saved the
class files during this process, you can use these to run in the JVM. If you
did not keep the class files, re-run the Java compiler against your Java source
files to produce new class files. If you want to, you can build the class
files into packages or JAR files (with the extension .jar) before placing
them in the HFS directory.
- Modify the PROGRAM resource definitions to add the JVM, JVMCLASS, and
JVMPROFILE options, and add the classes that the applications use to the class
paths for their JVMs, as described in "Enabling
applications to use a JVM" in Java Applications in CICS. Note that placing application
classes on the shareable application class path, rather than on the standard
class path, produces the best performance in a resettable JVM, and it should
be your normal choice for loading application classes in a production environment.
- If the Java programs access DB2®, follow the instructions in "Requirements to support Java programs in the CICS DB2 environment"
in CICS DB2 Guide to add the necessary DB2 directories and files to the class paths
in the JVM profiles, and ensure that you have applied any DB2 APARs that are
needed for your version of DB2.
- Test that the Java programs work correctly in the JVMs that you have
defined for them. Pay particular attention to the level of reusability that
you choose for the JVMs, which is described in "How
JVMs are reused and reset" in Java Applications in CICS.
- Java program objects that are migrated to run in a resettable JVM are likely to suffer a significant performance degradation
if they use Java methods that make the JVM unresettable. If a JVM
is found to be unresettable, it is destroyed after use, so CICS incurs the
CPU cost of initializing a new JVM. For details of the Java methods
that make the JVM unresettable see the IBM Software Developer Kit for z/OS, Java 2 Technology Edition, Version 1.4.2 document, Persistent Reusable Java Virtual Machine User's Guide, SC34-6201. "Resettable JVMs (REUSE=RESET)" in Java Applications in CICS explains
how to log unresettable actions when you are testing your applications in
a JVM.
- If your applications must perform unresettable actions, you can use a single-use JVM, but the performance of this type of JVM
is inferior. With a single-use JVM, the CPU cost of initializing a new JVM
is always incurred, and the only advantage over a resettable JVM is that no
time is spent checking whether or not the JVM has been made unresettable.
The best strategy is to re-design the programs as soon as possible to eliminate
unresettable actions, so that they can run in a resettable JVM or in a continuous
JVM.
- A continuous JVM should not be selected until you
are sure that your programs do not perform any unwanted unresettable actions,
which would change the state of the JVM in undesirable ways. The continuous
JVM is not destroyed if an unresettable action is performed in it, but careful
coding is required to ensure that subsequent program invocations in the JVM
are not adversely affected. "Continuous JVMs (REUSE=YES)"
in Java Applications in CICS explains the design guidance for programs that are to be
run in a continuous JVM. If you can re-design your programs following this
guidance, the continuous JVM provides the best performance of the three types
of JVM.
To avoid problems with deprecated APIs, you should develop all new Java programs forCICS Transaction Server for z/OS, Version 3 Release 1 using an application development environment
that supports Java 2 at the same version of Java as
used by CICS. You may run code compiled with an older version of Java in
a new runtime, provided that it does not use APIs that have been removed in
the newer version of Java. Note also that enterprise beans that
support the EJB 1.0 specification need to be migrated to the EJB 1.1 specification
level using the
Assembly Toolkit (ATK) or the Application Assembly Tool (AAT), which are supplied
with IBM® WebSphere Application Server..
Enterprise beans developed using any version of the EJB specification after
EJB 1.1 must restrict themselves to the EJB 1.1 APIs.
[[ Contents Previous Page | Next Page Index ]]