NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.1+)
getResultSetType()●
getUpdateCount()●
getWarnings()●
setCursorName()●
setFetchDirection(int direction)●
setFetchSize(int rows)●
setMaxFieldSize()●
The SQL/MP drivers do not support the following SQLMPStatement methods:
cancel()●
getMaxRows()●
setEscapeProcessing()●
setMaxRows()●
setQueryTimeout()●
Transactions and the JDBC Driver for SQL/MP
The Transaction Management Facility (TMF) is the system entity that manages transactions. You cannot make procedure
calls to TMF directly from any Java application. You must use either the com.tandem.tmf.Current class or the Java
Transaction API (JTA) to manage transactions.
Autocommit Mode and the Standard Driver
In autocommit mode, the standard driver automatically manages transactions for you. You do not need to explicitly begin and
end transactions. In fact, if you have used the Current class method or JTA to begin a transaction before invoking the standard
driver, the driver throws an exception.
Each statement forms a separate transaction that is committed when the statement is closed or the next time an
executeQuery, executeUpdate, or execute method is invoked. When a ResultSet is returned, the standard driver
commits the transaction when the last row of the result set is retrieved, when the ResultSet is closed, or when the statement
is closed (which automatically closes the ResultSet). If you invoke another executeQuery, executeUpdate, or
execute method while a ResultSet is open, the driver closes the result set andcommits the transaction. The driver then
begins a new transaction for the newly invoked method.
Autocommit mode is the default for the standard SQL/MP driver.
Nonautocommit Mode and the Standard Driver
In nonautocommit mode, you must manually commit or roll back a transaction. In this mode, a transaction is defined as all the
statements preceding an invocation of commit() or rollback(). Both commit() and rollback() are methods in the
Connection class.
Autocommit Mode and the Transaction-Aware Driver
Requesting autocommit mode (that is, specifying setAutoCommit(true)) with the transaction-aware driver causes a
SQLException to be thrown.
Nonautocommit Mode and the Transaction-Aware Driver
Nonautocommit mode is the default for the transaction-aware driver. You must manage all transactions using
com.tandem.tmf.Current or the JTA.