156 DB2 for OS/390 and z/OS Powering the World’s e-business
Before V7 DB2 for OS/390 provides support for a compiled Java stored
procedure only. A Java Virtual Machine (JVM) is not required for Java stored
procedures. They are compiled using the High Performance Java (HPJ)
compiler, which is part of VisualAge for Java Enterprise Edition for OS/390.
Compiled Java gives better performance than executing interpreted Java in a
We discuss the following procedures for Java stored procedures:
“Setting the system environment” on page 156
“Preparing compiled Java stored procedures” on page 165
“Runtime environment” on page 172
“Common errors” on page 174
More information is reported in DB2 UDB for OS/390 and z/OS Version 7
Application Programming Guide and Reference for Java, SC26-9932, and DB2
Java Stored Procedures: Learning by Example, SG24-5945.
Refer to the following Web site for general information about stored procedures
in DB2 for OS/390:
Setting the system environment
In this section we summarize the setting for the system environment to run a
compiled Java stored procedure in an S/390 system. The interpreted Java stored
procedure is not available at the time of writing, but it will be available later on in
DB2 for OS/390 and z/OS Version 7 with APAR PQ46673.
DB2 V7 with APAR PQ46673 extends Java support for stored procedures
to allow interpreted Java stored procedures. Unlike compiled Java stored
procedures which are executed in the WLM stored procedure address
space, the Interpreted Java is invoked by the WLM stored procedure
address space, but is executed in a Java Virtual Machine (JVM) under
OS/390 UNIX System Services (USS).