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-11
Controlling JVM Startup Options
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 on page 2-11
JVM Startup Options for Each SPJ Caller on page 2-12
Using Multiple UDR_JAVA_OPTIONS Settings in One Application on page 2-15
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.