SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)

Advantages of Copying the Java Classes
The advantage of this approach is that there are fewer cross-node dependencies. If the network is
disconnected or if one node goes down (for example, \NODEA), a statically compiled application
can still execute the SPJ on the remaining node (for example, \NODEB), as long as the procedure
label of the SPJ is still available.
The procedure label is available if it is located on the same node (in this case, \NODEB) as the
calling application or if it is located on a remote node that is still connected and visible (for example,
\NODEC). If the procedure label is unavailable (for example, if it is on \NODEA), the CALL statement
that invokes the SPJ will fail. For more information about the procedure label, see Naming the
Procedure Label (page 66) TPSEC04.fm Naming the Procedure Label and Showing the Procedure
Label (page 91).
Currently, NonStop SQL/MX has limited local node autonomy because it disallows the replication
of metadata from one node to another. For more information about the limitations on local node
autonomy, see the SQL/MX Installation and Upgrade Guide and SQL/MX Management Manual.
Disadvantages of Copying the Java Classes
The disadvantage of this approach is that the Java classes must be maintained on more than one
node. If you change and recompile the Java class on one node, you must do the same on the other
node. Otherwise, the SPJ might behave inconsistently in a distributed database environment.
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 10.
Using SPJs in a Distributed Database Environment 99