SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)
Figure 5 Initialization of SQL/MX UDR Server Processes
Reinitialization of the SPJ Environment
In rare cases, the SQL/MX UDR server might crash unpredictably because of internal system errors
or the application code. In such cases, the SPJ environment is reinitialized when a CALL statement
is issued following the crash.
Multithreading in an SPJ Environment
Within an SPJ environment, NonStop SQL/MX manages a single thread of execution, even for
multithreaded Java applications. The CALL statements in a multithreaded application can execute
in a nonblocking manner, but the SPJ methods underlying those CALL statements execute serially
within a given SPJ environment.
In SQL/MX Release 2.0 ABJ SPRs and later releases, the SQL/MX UDR server sets the default
behavior to blocking mode. The blocking mode decreases CPU path length and improves
performance in the SPJ environment. You can enable or disable nonblocking JDBC/MX in the SPJ
environment by specifying JVM startup options. To specify JVM startup options in the SPJ
environment, see Controlling JVM Startup Options (page 36).
For information about nonblocking JDBC/MX, see the JDBC Type 2 Driver Programmer's Reference
for SQL/MX.
To support parallelism of CALL statements issued from a multithreaded application, use different
UDR_JAVA_OPTIONS settings for each CALL statement. The execution of a CALL statement with a
different UDR_JAVA_OPTIONS setting initiates a separate SQL/MX UDR server process with its
own SPJ environment. These SPJ environments can process requests in parallel from a multithreaded
The SPJ Environment 27










