Chapter 5. Java Stored Procedures And User-Defined Functions; Setting Up The Environment For Java Routines - IBM DB2 Manual

Table of Contents

Advertisement

Chapter 5. Java stored procedures and user-defined functions

Setting up the environment for Java routines

|
|
|
|
|
|
|
© Copyright IBM Corp. 1998, 2008
Like stored procedures and user-defined functions in any other language, Java
stored procedures and user-defined functions are programs that can contain SQL
statements. You invoke Java stored procedures from a client program that is
written in any supported language.
The following topics contain information that is specific to defining and writing
Java user-defined functions and stored procedures.
In these topics, the word routine refers to either a stored procedure or a
user-defined function.
Before you can run Java routines, you need to set up a WLM environment and
Java environment variables for them.
Before you can prepare and run Java routines, you need to satisfy the following
prerequisites:
v Java 2 Technology Edition, V5 or later.
The IBM Data Server Driver for JDBC and SQLJ supports 31-bit or 64-bit Java
applications. If your applications require a 64-bit JVM, you need to install the
IBM 64-bit SDK for z/OS, Java 2 Technology Edition, V5.
v TCP/IP
TCP/IP is required on the client and all database servers to which you connect.
v The version of the IBM Data Server Driver for JDBC and SQLJ that matches the
DB2 for z/OS version.
If you are migrating from a previous release of DB2 for z/OS, you need to
install the corresponding version of the IBM Data Server Driver for JDBC and
SQLJ.
This topic discusses the setup tasks for preparing and running Java routines.
If you plan to use IBM Data Studio to prepare and run your Java routines, see the
information on developing database routines in the IBM Data Studio information
center, at the following URL:
http://publib.boulder.ibm.com/infocenter/dstudio/v1r1m0/index.jsp
To set up the environment for running Java routines, you need to perform these
tasks:
1. Ensure that your operating system, SDK for Java, and the IBM Data Server
Driver for JDBC and SQLJ are at the correct levels, and that you have installed
all prerequisite products.
Important: If you have migrated the DB2 subsystem from a previous release of
DB2 for z/OS, your existing Java stored procedures and user-defined function
no longer work with the previous release of the IBM Data Server Driver for
JDBC and SQLJ and the current release of DB2 for z/OS. You need to install the
version of the IBM Data Server Driver for JDBC and SQLJ that matches the
DB2 for z/OS release level, and update the WLM-managed stored procedure
address space configuration and JAVAENV data set to use the current driver.
157

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents