17.3 Environment setup

Executor: Superuser and HiRDB administrator

Figure 17-5 shows the procedure for setting up an environment for using Java stored procedures and Java stored functions. The explanation here assumes that the environment setup for the Java Virtual Machine and JDBC Driver has been completed.

When the environment setup explained here is completed, Java stored procedures and Java stored functions can be created and executed; for details on the creation and execution procedures, see the manual HiRDB Version 8 UAP Development Guide.

Figure 17-5 Environment setup procedure for use of Java stored procedures and Java stored functions

[Figure]

Note
The numbers to the left of the processing boxes correspond to the paragraph numbers of the explanations on the following pages. For example, step 3 is explained in paragraph (3) below.

* This step is applicable to the HP-UX, Solaris, and AIX 5L versions only; it is not required for the Linux version. This step is also not required if the POSIX Library version is already being used.

Organization of this section
(1) Create a directory for storing JAR files
(2) Use the pdstop command to terminate HiRDB normally
(3) Specify Java-related HiRDB system definition operands
(4) Use pdsetup command to set up POSIX Library version (applicable to HP-UX, Solaris, and AIX 5L versions only)
(5) Use the pdstart command to start HiRDB normally

(1) Create a directory for storing JAR files

Create a directory for storing the JAR files. The name of the directory created here will be specified in the pd_java_archive_directory operand in step (3).

Hint
  • Create a special directory in which to store JAR files.
  • Do not store files other than installed JAR files in the JAR directory.

(2) Use the pdstop command to terminate HiRDB normally

pdstop

If you use the system reconfiguration command (pdchgconf command), you do not need to restart HiRDB normally, because this command enables you to modify HiRDB system definitions while HiRDB is running. Note that HiRDB Advanced High Availability must be installed in order to use this command. For details about modifying HiRDB system definitions while HiRDB is running, see 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).

(3) Specify Java-related HiRDB system definition operands

Specify the following Java-related operands in the HiRDB system definition:

pd_java_option
Specifies the Java option.
pd_java_routine_stack_size
Specifies in bytes the size of the stack to be used by Java routines.
pd_java_archive_directory
Specifies the directory for storing the JAR files.
pd_java_classpath
Specifies a Java class path.
pd_java_runtimepath
Specifies the root directory of the Java Runtime Environment.
pd_java_libpath
Specifies the library directory of the Java Virtual Machine.
pd_java_stdout_file
Specifies the output destination file for the Java Virtual Machine's standard output and standard error output.

(4) Use pdsetup command to set up POSIX Library version (applicable to HP-UX, Solaris, and AIX 5L versions only)

To use a Java stored procedure or Java stored function, the POSIX library version must be used. To use the POSIX library version, specify the -l option in the pdsetup command that is executed at the time of environment setup for HiRDB. The -l option should be specified in the pdsetup command at the time a new HiRDB is installed.

If HiRDB is already running but the POSIX library version is not being used, apply the procedure described below to change HiRDB to the POSIX library version.

Procedure
  1. Use the pdsetup -d command to delete HiRDB from the OS. Choose y in response to the message.
    In the case of a HiRDB/Parallel Server, execute the pdsetup -d command at all server machines.
  2. Execute the pdsetup command with POSIX specified in the -l option.
    In the case of a HiRDB/Parallel Server, execute the pdsetup -l command at all server machines.
    Note
    • Because it supports POSIX, you do not need to perform the above procedure for the HP-UX (IPF) version of HiRDB.
    • HiRDB Version 5.0 and older versions do not support the POSIX library version. When HiRDB is being upgraded from Version 5.0 or older, use this procedure to change HiRDB to the POSIX library version.
    • If the -l option was not specified in the pdsetup command when a new HiRDB was being installed, use this procedure to change the HiRDB to the POSIX library version.

(5) Use the pdstart command to start HiRDB normally

pdstart