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

Introduction
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
1-7
Effect of Registering an SPJ
2. The catalog manager within the MXCMP process invokes an internal SPJ named
VALIDATEROUTINE, which is in SYSTEM_SQLJ_SCHEMA, and passes
information from the CREATE PROCEDURE statement to it.
3. VALIDATEROUTINE 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).
VALIDATEROUTINE 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.
The procedure label is used internally by NonStop SQL/MX to track privileges on
an SPJ. For more information, see Showing the Procedure Label on page 6-11.