SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)
To use UDR_JAVA_OPTIONS, see Controlling JVM Startup Options (page 36). To use the
_RLD_LIB_PATH environment variable, see the NonStop Server for Java 7.0 Programmer’s Reference.
UDR Extensions Class Path for the JDBC/MX JAR File
By default, NonStop SQL/MX loads the jdbcMx.jar file of JDBC/MX from the standard location
of /usr/tandem/jdbcMx/current/lib into the SPJ environment. To use jdbcMx.jar in a
nonstandard location, set the UDR extensions class path as you would on systems running G-series
RVUs. For more information, see Setting the JDBC/MX Location (page 42).
Controlling JVM Startup Options
JVM startup options are passed to the Java application launcher (java) and influence the Java
run-time environment. To specify JVM startup options for an SPJ environment, set the
UDR_JAVA_OPTIONS default attribute. Use the UDR_JAVA_OPTIONS default attribute to:
• Override the NonStop Server for Java and JDBC/MX driver that are configured in the Java
environment.
• Set class paths for an application that calls SPJs.
• Set Java system properties for an application that calls SPJs.
• Control the Java heap size of the SPJ environment.
• Troubleshoot the SPJ environment.
This subsection covers these topics:
• JVM Startup Options for All Processes on a Node (page 36)
• JVM Startup Options for Each SPJ Caller (page 37)
• Using Multiple UDR_JAVA_OPTIONS Settings in One Application (page 39)
For more information about the UDR_JAVA_OPTIONS default attribute, see the SQL/MX Reference
Manual.
JVM Startup Options for All Processes on a Node
To set JVM startup options for all SPJ environments on a node, insert the UDR_JAVA_OPTIONS
default attribute as a row in the SYSTEM_DEFAULTS table:
SET SCHEMA NONSTOP_SQLMX_node.SYSTEM_DEFAULTS_SCHEMA;
INSERT INTO SYSTEM_DEFAULTS
(ATTRIBUTE, ATTR_VALUE)
VALUES ('UDR_JAVA_OPTIONS',
'-Djava.class.path=/usr/myclasses -Xmx32M');
The UDR_JAVA_OPTIONS setting in the SYSTEM_DEFAULTS table overrides the system-defined
default setting, which is OFF. For more information, see the SQL/MX Reference Manual.
Scope of JVM Startup Options in the SYSTEM_DEFAULTS Table
A UDR_JAVA_OPTIONS setting in the SYSTEM_DEFAULTS table persists for all processes (or
sessions) that run on the same node as the SYSTEM_DEFAULTS table. The insertion of the
UDR_JAVA_OPTIONS setting into the SYSTEM_DEFAULTS table does not affect the current process.
You must end and restart the process for the setting to take effect. In addition, the insertion does
not affect previously compiled modules of an SQL/MX application unless you recompile those
modules.
Precedence of JVM Startup Options
A UDR_JAVA_OPTIONS setting in a CONTROL QUERY DEFAULT statement takes precedence over
the setting in the SYSTEM_DEFAULTS table. See JVM Startup Options for Each SPJ Caller (page 37).
36 Getting Started










