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-13
SQL/MX UDR Server Process
Single SQL/MX UDR Server Process Per Application
An SQL/MX application that does not switch user identities and that uses only one
UDR_JAVA_OPTIONS setting 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.
The UDR_JAVA_OPTIONS default attribute controls the JVM startup options in an SPJ
environment. For more information, see Controlling JVM Startup Options on page 2-11.
Multiple SQL/MX UDR Server Processes Per Application
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.
Applications that initiate multiple SQL/MX UDR server processes include NonStop
ODBC/MX and JDBC/MX applications. NonStop ODBC/MX clients often switch user
identities. Multithreaded JDBC/MX applications can use different
UDR_JAVA_OPTIONS settings for different threads.
For these types of applications, new SQL/MX UDR server processes are started as
needed and then stopped when all the SQL contexts that were serviced by the
SQL/MX UDR server process either end or change their user identity. For more
information, see Conditions Causing Initialization of an SPJ Environment on page 1-13.
Conditions Causing Initialization of an SPJ Environment
When an application issues a CALL statement (that is, invokes an SPJ), the SQL/MX
executor starts a new SQL/MX UDR server process and initializes a new SPJ
environment if any of these conditions are met:
An SPJ environment is not currently servicing the application (that is, the CALL
statement is the first one executed by the application).
The SPJ environments that are currently servicing the application are not
associated with the current user identity.
The CALL statement has a UDR_JAVA_OPTIONS setting (other than ANYTHING)
that is different from the UDR_JAVA_OPTIONS setting in the SPJ environments
that are servicing the application under the current user identity.
See Determining the Uniqueness of UDR_JAVA_OPTIONS Settings on page 2-15.
Conditions Preventing Initialization of an SPJ Environment
The execution of a CALL statement does not start a new SQL/MX UDR server process
and initialize a new SPJ environment if one of these conditions is met: