SQL/MX 3.2 Guide to Stored Procedures in Java (H06.25+, J06.14+)
Getting Started
HP NonStop SQL/MX Release 3.2 Guide to Stored Procedures in Java—691166-001
2-10
Using Multiple UDR_JAVA_OPTIONS Settings in
One Application
statements that you issue in MXCI after you issue the CONTROL QUERY DEFAULT
statement.
For example, the first CONTROL QUERY DEFAULT statement sets the class path for
the SPJ environment of subsequent CALL statements that you issue in MXCI. When
you call the LOWERPRICE procedure after issuing the CONTROL QUERY DEFAULT
statement, the JVM uses the /usr/otherclasses class path to search for and load
classes that are not in the external path of that SPJ. The second CONTROL QUERY
DEFAULT statement resets the UDR_JAVA_OPTIONS setting to the class path in
effect, if any, at the start of the current MXCI session:
>>CALL samdbcat.sales.monthlyorders(1,?);
NUMBER
-----------
1
--- SQL operation complete.
>>CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS
'-Djava.class.path=/usr/myclasses';
--- SQL operation complete.
>>CALL samdbcat.sales.lowerprice();
--- SQL operation complete.
>>CONTROL QUERY DEFAULT UDR_JAVA_OPTIONS RESET;
--- SQL operation complete.
For more information about MXCI, see the SQL/MX Reference Manual.
Displaying the UDR_JAVA_OPTIONS in Effect for an MXCI
Session
To show the UDR_JAVA_OPTIONS setting in effect for a CONTROL QUERY
DEFAULT statement issued in MXCI, enter the SHOWCONTROL command in the
current MXCI session. For more information about SHOWCONTROL, see the SQL/MX
Reference Manual.
Using Multiple UDR_JAVA_OPTIONS Settings in One Application
In the same application, you can set multiple UDR_JAVA_OPTIONS, each of which
controls the JVM startup options in an SPJ environment. Two or more
UDR_JAVA_OPTIONS settings are considered different or identical, depending on how
you specify them in CONTROL QUERY DEFAULT statements. See Determining the
Uniqueness of UDR_JAVA_OPTIONS Settings on page 2-11.










