SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)
Figure 4 SPJ Environment in NonStop SQL/MX
This subsection explains some of the ways in which the SPJ environment in NonStop SQL/MX
differs from a typical Java environment:
• SQL/MX UDR Server Process (page 25)
• Multithreading in an SPJ Environment (page 27)
• Class Loaders in an SPJ Environment (page 28)
• Application Classes That an SPJ Can Access (page 29)
• Maintaining Class and JAR Files in an SPJ Environment (page 30)
SQL/MX UDR Server Process
The SQL/MX UDR server is a program executable named MXUDR in $SYSTEM.SYSTEM. When
NonStop SQL/MX processes the first CALL statement of an application, it starts an SQL/MX UDR
server process. An SQL/MX UDR server process hosts one SPJ environment and services one or
more CALL statements of an SQL/MX application during its execution. When an application
terminates, its SQL/MX UDR server processes also terminate.
For an SQL/MX application, the SQL/MX UDR server process that services the application can be
single or multiple per connection to the database.
Single SQL/MX UDR Server Process Per Connection
An SQL/MX application that uses a single connection to the database has only one SQL/MX UDR
server process service the application. All the CALL statements in such an application are processed
in one SPJ environment.
Multiple SQL/MX UDR Server Processes Per Connection
An SQL/MX application that switches user identities or that uses different UDR_JAVA_OPTIONS
settings has multiple SQL/MX UDR server processes service the application. The CALL statements
in such an application are processed in multiple SPJ environments, with each CALL statement being
processed in one SPJ environment.
Whenever there is a change in the user identity or in the UDR_JAVA_OPTIONS setting, a new
SQL/MX UDR server process is launched. A different SPJ environment is created and the subsequent
procedure calls are serviced using this new SQL/MX UDR process. See Figure 5 (page 27)
The SPJ Environment 25










