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

Managing SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
6-21
Specifying the Node in the External Path
Specifying the Node in the External Path
Register the SPJ with an external path that begins with the name of the node. That is,
specify the full path (for example, /E/NODEA/usr/mydir/myclasses) in the
EXTERNAL PATH clause of the CREATE PROCEDURE statement. The full path of the
Java class is stored in the SQL/MX system metadata, as shown in Figure 6-2.
When an application on the remote \NODEB calls the SPJ, the JVM looks for the Java
class in the /E/NODEA/usr/mydir/myclasses directory on \NODEA. Regardless of
where you issue the CALL statement, the JVM in the SPJ environment always tries to
load the Java class from the OSS directory on the node that you specify in the
EXTERNAL PATH clause.
Figure 6-2. Specifying the Node in the External Path
NONSTOP_SQLMX_NODEB.
SYSTEM_SCHEMA tables
SAMDBCAT is visible.
VST010.vsd
\NODEB
\NODEA
CREATE PROCEDURE
samdbcat.sales.lowerprice()
EXTERNAL NAME 'Sales.lowerPrice'
EXTERNAL PATH
'
/E/NODEA/usr/mydir/myclasses'
LANGUAGE JAVA
PARAMETER STYLE JAVA
MODIFIES SQL DATA;
From \NODEA, register
SAMDBCAT on the
remote \NODEB.
1
Create the SPJ in
SAMDBCAT on
\NODEA and specify
the node in the
EXTERNAL PATH
clause.
2
NONSTOP_SQLMX_NODEA.
SYSTEM_SCHEMA tables
SAMDBCAT user catalog
OSS directory:
/usr/mydir/myclasses
Class file:
Sales.lowerPrice
SQL/MX
metadata tables
in SAMDBCAT
NonStop SQL/MX stores
information about the
SPJ in the
SQL/MX metadata
tables.
3