A GET_JAVA_STORED_ROUTINE_SOURCE specification extracts a Java class source file from a JAR file.
Java routines can be used in the HP-UX, Solaris, AIX 5L, Linux, and Windows versions of HiRDB. In the case of HP-UX, Solaris, and AIX 5L, Java routines cannot be used if a POSIX library version of HiRDB is not set up (by executing the pdsetup command) or if a POSIX library version of HiRDB has been reinstalled as a non-POSIX library version of HiRDB. For details of the pdsetup command, see the manual HiRDB Version 8 Command Reference.
GET_JAVA_STORED_ROUTINE_SOURCE (class-name, JAR-filename
[, source-file-maximum-length])
Specifies a class name as a character string of no more than 255 bytes; following is the format:
'[package-name.] class-identifier'
In class-name, VARCHAR type value expressions with a maximum of 255 bytes can be specified.
If only a ? parameter or an embedded variable is specified in class-name, the ? parameter or the embedded variable must be a simple structure.
Specifies the name of a JAR file as a character string of no more than 255 bytes.
In JAR-filename, VARCHAR type value expressions with a maximum of 255 bytes can be specified.
A JAR file name must not be specified as a path name.
If only a ? parameter or an embedded variable is specified in JAR-filename, the ? parameter or the embedded variable should be a simple structure.
Specifies as an integer literal the maximum length (in bytes) of the source file from which data is to be extracted.
The specifiable range is 1 to 2,147,483,647. The null value cannot be specified. The default is 2,147,483,647.
Extract the contents of the source file for a Java routine (JAVAROUTINE) registered in a schema (USER1):
SELECT GET_JAVA_STORED_ROUTINE_SOURCE(CLASS_NAME,JAR_NAME)
FROM MASTER.SQL_ROUTINES
WHERE ROUTINE_SCHEMA='USER1' AND ROUTINE_NAME='JAVAROUTINE'