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-20
Setting the JDBC/MX Location
Setting the JDBC/MX Location
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. In some cases, you might want to use another version of JDBC/MX that
is compatible with NonStop SQL/MX but that is not installed in the standard location. To
use jdbcMx.jar in a nonstandard location, you must set the UDR extensions class
path to the JAR file path of jdbcMx.jar.
When an SQL/MX application starts with a UDR extensions class path setting for the
JDBC/MX location, NonStop SQL/MX loads jdbcMx.jar from the specified location
into an SPJ environment created for the application.
UDR Extensions Class Path
Before setting the JDBC/MX location, consider that:
The UDR extensions include jdbcMx.jar and are not the same as the JVM
extensions, which are typically located in $JREHOME/lib/ext.
The SQL/MX UDR server has its own search path for UDR extensions, called the
UDR extensions class path, and this class path contains a standard location for
jdbcMx.jar.
The UDR extensions class path is not the same as the class path. Do not use the
class path to specify the location of a JDBC/MX driver in the SPJ environment. For
more information about the class path, see Setting the Class Path on page 2-22.
The -Dsqlmx.udr.extensions option adds a class path to the beginning of the
search path of the SQL/MX UDR server. The -Dsqlmx.udr.extensions setting
takes precedence over but does not override the search path.
Setting the JDBC/MX Location by Using UDR_JAVA_OPTIONS
Use the UDR_JAVA_OPTIONS default attribute to set the JDBC/MX location in an SPJ
environment for an application or for all processes running on the node.
To set the JDBC/MX location by using the UDR_JAVA_OPTIONS default attribute, use
this attribute value:
Note. If you set the JDBC/MX location on a system running a G-series RVU, verify that the
same product version of the JDBC/MX driver is bound into the SQL/MX UDR server. For more
information, see Verifying the SQL/MX UDR Server
on page 2-3.
Note. If you specify an alternate JDBC/MX location by using the
-Dsqlmx.udr.extensions option and jdbcMx.jar does not exist at that location,
NonStop SQL/MX uses the standard location for jdbcMx.jar.
'-Dsqlmx.udr.extensions=jdbcmx-jar-filepath'