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-19
Copying Java Classes to the Remote Node
Copying Java Classes to the Remote Node
Copy all the Java classes required for the SPJ from the local node (for example,
\NODEA) to the same OSS directory on the remote node (for example, \NODEB). By
default, only a relative path of the Java class is stored in the SQL/MX system
metadata. Therefore, when an application on the remote \NODEB calls the SPJ, the
JVM looks for the Java class in the OSS directory on \NODEB. See Figure 6-1.
Figure 6-1. Copying Java Classes to the Remote Node
OSS directory:
/usr/mydir/myclasses
Class file:
Sales.lowerPrice
NONSTOP_SQLMX_NODEB.
SYSTEM_SCHEMA tables
SAMDBCAT is visible.
VST009.vsd
\NODEB
\NODEA
CREATE PROCEDURE
samdbcat.sales.lowerprice()
EXTERNAL NAME 'Sales.lowerPrice'
EXTERNAL PATH '
/usr/mydir/myclasses'
LANGUAGE JAVA
PARAMETER STYLE JAVA
MODIFIES SQL DATA;
Copy the Java class file
of the SPJ to the remote
\NODEB.
2
From \NODEA, register
SAMDBCAT on the
remote \NODEB.
1
Create the SPJ in
SAMDBCAT on
\NODEA.
3
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.
4