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-16
Class Loaders in an SPJ Environment
directory or JAR file specified by that external path and for loading all application
classes that are used by those SPJ classes. The SPJ class loader, instead of the
system class loader, loads application classes from directories and JAR files specified
in the class path.
In Figure 1-6, an SPJ method named myMethod3() in the
/usr/myapps/myJar.jar external path accesses an application class named
other.class in the /usr/otherapps class path. The SPJ class loader for the
/usr/myapps/myJar.jar external path loads a copy of other.class in addition to
the class file containing the SPJ method myMethod3().
Figure 1-6. SPJ Class Loaders in an SQL/MX UDR Server Process
VST007.vsd
One SPJ class loader is created and
assigned for each distinct external path.
SPJA
EXTERNAL NAME:
'pkg1.subpkg1.myClass1.myMethod1()'
EXTERNAL PATH:
'/usr/myapps'
SPJB
EXTERNAL NAME:
'pkg2.subpkg2.myClass2.myMethod2()'
EXTERNAL PATH:
'/usr/myapps/myJar.jar'
SPJC
EXTERNAL NAME:
'pkg3.subpkg3.myClass3.myMethod3()'
EXTERNAL PATH:
'/usr/myapps/myJar.jar'
SQL/MX UDR Server Process
SPJ Environment
CALL...
SPJ Class Loader X
for External Path
'/usr/myapps'
SPJ Class Loader Y
for External Path
'/usr/myapps/myJar.jar'
CALL...
CALL...
Loads...
Loads...
Refers to...
Application Class
other.class in the
/usr/otherapps class path
Copy of
Application
Class
other.class