NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.0+)

Transaction-Aware SQL/MP Driver
The transaction-aware SQL/MP driver, sqlmptx, requires that you manage the transactions, explicitly beginning and
ending them using Current class methods.
By default, the transaction-aware driver connects to an SQL/MP database using nonautocommit mode.
Note: setAutocommit(true) causes the tranasaction-aware driver to throw an SQLException.
JDBC DriverManager
The JDBC DriverManager maintains a list of available JDBC drivers. When a program calls the getConnection
method, the JDBC DriverManager searches this list and connects the calling program to the appropriate JDBC
driver.
Loading a Driver
To load a JDBC driver, load its JDBC driver class (not the JDBC driver file, whose name has the suffix .class) into
the Java Virtual Machine (JVM) in one of the following ways:
Specify the JDBC driver class on the java command line.
Add the JDBC driver class to the jdbc.drivers property.
Load the JDBC driver class directly into the JVM.
The first two of the preceding ways allow you to change drivers without modifying your program code; the third way
does not.
The original SQL/MP driver and the transaction-aware driver share the same code; therefore, you use the same syntax to
load either of them.
Note: The SQL/MP driver file, com/tandem/sqlmp/SQLMPDriver.class, is stored in the JAR file
sqlmp.jar, which contains Compaq additions to the JVM. The SQL/MP driver file belongs to the JDBC
driver class com.tandem.sqlmp.SQLMPDriver.
The following figure shows a JDBC driver class being loaded into the JVM, which already contains the JDBC
DriverManager and three databases.
Loading a JDBC Driver Class Into the JVM