SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)
CALL...
CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
'-Xmx32M -Djava.class.path=/usr/otherclasses';
CALL...
However, each of these UDR_JAVA_OPTIONS settings is different because of the different order
of the options:
CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
'-Xmx32M -Djava.class.path=/usr/otherclasses';
CALL...
CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
'-Djava.class.path=/usr/otherclasses -Xmx32M';
CALL...
These UDR_JAVA_OPTIONS settings are considered different because of differences in white space:
CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
' -Xmx32M -Djava.class.path=/usr/otherclasses ';
CALL...
CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
'-Xmx32M -Djava.class.path=/usr/otherclasses';
CALL...
Performance Considerations of Using Multiple UDR_JAVA_OPTIONS Settings
When an SQL/MX application executes CALL statements under different UDR_JAVA_OPTIONS
settings, multiple SQL/MX UDR server processes service the application. NonStop SQL/MX maintains
an SQL/MX UDR server process for each different set of UDR_JAVA_OPTIONS in an application.
Each SQL/MX UDR server process contains its own embedded JVM.
CAUTION: 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 (page 25).
Setting the JREHOME Location
By default, NonStop SQL/MX loads Java components from the standard location of the NonStop
Server for Java into the SPJ environment. If you install the NonStop Server for Java in a nonstandard
location, you must set the JREHOME location to the current installation directory of the NonStop
Server for Java.
When an SQL/MX application starts with a JREHOME setting, NonStop SQL/MX loads the Java
components from that JREHOME location into an SPJ environment created for the application.
To set the JREHOME location, use one of these approaches:
• Setting JREHOME by Using UDR_JAVA_OPTIONS (page 40)
• Setting the JREHOME Environment Variable (page 41)
Each approach has a different scope and influence on CALL or CREATE PROCEDURE statements.
Setting JREHOME by Using UDR_JAVA_OPTIONS
Use the UDR_JAVA_OPTIONS default attribute to set the JREHOME location in an SPJ environment
for an application or for all processes running on the node. The UDR_JAVA_OPTIONS default
attribute is particularly useful for NonStop ODBC/MX applications, which cannot use environment
variables set in the OSS or Guardian environment.
To set the JREHOME location by using the UDR_JAVA_OPTIONS default attribute, use this attribute
value:
'-Dsqlmx.udr.jrehome= java-installation-directory/jre'
40 Getting Started










