SQL/MX Guide to Stored Procedures in Java (H06.04+, J06.03+)

Introduction
HP NonStop SQL/MX Guide to Stored Procedures in Java540433-003
1-7
Effect of Registering an SPJ
2. The catalog manager within the MXCMP process invokes an internal SPJ named
VALIDATEROUTINE2, which is in SYSTEM_SQLJ_SCHEMA, and passes
information from the CREATE PROCEDURE statement to it.
3. VALIDATEROUTINE2 validates the Java class and method specified in the
CREATE PROCEDURE statement within an SQL/MX UDR server process (shown
as the MXUDR executable in Figure 1-2
on page 1-6).
VALIDATEROUTINE2 uses the embedded Java virtual machine (JVM) within the
SQL/MX UDR server process to verify that the Java method exists in the specified
class and that its signature maps to the SQL parameters specified in the CREATE
PROCEDURE statement. If the method exists and its signature maps to the SQL
parameters, the SQL/MX UDR server returns a condition indicating success to the
MXCMP process. Otherwise, the SQL/MX UDR server returns an error condition,
and Steps 4 and 5
do not complete.
4. The catalog manager inserts information about the SPJ into the system metadata
tables:
°
The ALL_UIDS table associates the SPJ with a unique identifier (UID).
°
The OBJECTS table contains information about each SPJ, such as its object
name, unique identifier (UID), creation time, and ownership.
°
The ROUTINES table contains the attributes, such as external name and path,
of each SPJ that is created in a catalog.
°
The COLS table contains the attributes of the individual parameters of an SPJ,
one row per parameter.
°
The TEXT table contains the text of the Java encoded signature of an SPJ.
°
The TBL_PRIVILEGES table contains the ownership and granted privileges for
each SPJ in a catalog.
°
The REPLICAS table contains information about the procedure label of an
SPJ.
For more information about these system metadata tables, see the
SQL/MX
Reference Manual
.
5. The catalog manager also creates a procedure label owned by the user who
issues the CREATE PROCEDURE statement.
Note. Systems running on J06.04 and earlier J-series RVUs or H06.15 and earlier H-
series RVUs have VAILDATEROUTINE internal SPJ only, whereas systems running on
J06.05 and later J-series RVUs or H06.16 and later H-series RVUs have both
VALIDATEROUTINE and VALIDATEROUTINE2 internal SPJs.
Additionally, MXCMP released in H06.16 and later RVUs invokes internal SPJ
VALIDATEROUTINE2 while MXCMP released in H06.15 or earlier RVUs invoke the
VAILDATEROUTINE internal SPJ.