SQL/MX Guide to Stored Procedures in Java (G06.24+, H06.03+)

Getting Started
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
2-21
Setting the JDBC/MX Location by Using
UDR_JAVA_OPTIONS
The jdbcmx-jar-filepath is the JAR file path of jdbcMx.jar.
Scope of the JDBC/MX Location in UDR_JAVA_OPTIONS
A JDBC/MX location set by a CONTROL QUERY DEFAULT statement affects the SPJ
environment of subsequent CALL or CREATE PROCEDURE statements. This
JDBC/MX location setting persists until the SQL/MX UDR server process, which hosts
the SPJ environment, ends. For more information, see SQL/MX UDR Server Process
on page 1-12. For example, use a CONTROL QUERY DEFAULT statement to set the
JDBC/MX location before a CALL statement in an application:
CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
'-Dsqlmx.udr.extensions=/usr/tandem/jdbcMx/T1225V311/lib/jdbcMx.jar';
CALL...
A JDBC/MX setting inserted into the SYSTEM_DEFAULTS table affects all CALL or
CREATE PROCEDURE statements that run on the system. This JDBC/MX setting
persists until someone updates the UDR_JAVA_OPTIONS attribute in the
SYSTEM_DEFAULTS table. For example, insert a row in the SYSTEM_DEFAULTS
table to set the JDBC/MX location for all CREATE PROCEDURE statements that are
registered on the system:
SET SCHEMA NONSTOP_SQLMX_node.SYSTEM_DEFAULTS_SCHEMA;
INSERT INTO SYSTEM_DEFAULTS
(ATTRIBUTE, ATTR_VALUE)
VALUES ('UDR_JAVA_OPTIONS',
'-Dsqlmx.udr.extensions=/usr/tandem/jdbcMx/T1225V311/lib/jdbcMx.jar');
For more information about the scope of the UDR_JAVA_OPTIONS setting, see
Controlling JVM Startup Options
on page 2-11.
Precedence of the JDBC/MX Location in
UDR_JAVA_OPTIONS
The CONTROL QUERY DEFAULT setting overrides the UDR_JAVA_OPTIONS setting
in the SYSTEM_DEFAULTS table.
Caution. NonStop SQL/MX maintains an SQL/MX UDR server process for each different set
of UDR_JAVA_OPTIONS in an application. The existence of multiple SQL/MX UDR server
processes might significantly affect system performance. Therefore, use
UDR_JAVA_OPTIONS settings in your application only when necessary. For more information,
see SQL/MX UDR Server Process on page 1-12.