JDBC/MX 5.0 Driver for SQL/MX Programmer's Reference (SQL/MX 2.x)

Holdable Cursors
JDBC/MX driver supports the holdablity attribute for the ResultSet. To use holdable cursors in your JDBC
applications, follow these guidelines:
Use one of the following constants for the holdablity attribute:
com.tandem.sqlmx.SQLMXResultSet.HOLD_CURSORS_OVER_COMMIT
Ensure that when the application calls the method Connection.commit or Connection.rollback,
the HOLD_CURSORS_OVER_COMMIT constant indicates that ResultSet objects are not closed.
com.tandem.sqlmx.SQLMXResultSet.CLOSE_CURSORS_AT_COMMIT
Ensure that when the application calls the method Connection.commit or Connection.rollback,
the CLOSE_CURSORS_AT_COMMIT constant indicates that ResultSet objects are closed.
For the ResultSet objects to be holdable over a commit operation, ensure that the SQL statement that generates
the ResultSet has either stream access mode, or embedded update or delete for table references.
Use either of the following methods in SQLMXConnection objects to create result sets with holdable cursors over
commit:
createStatement(int resultSetType, int resultSetConcurrency,
int resultSetHoldability)
prepareStatement(String sql, int resultSetType,
int resultSetConcurrency, int resultSetHoldability)
For a demonstration in a sample program, see the holdJdbcMx.java program description.
Connection Pooling
JDBC/MX provides an implementation of connection pooling, where a cache of physical database connections are
assigned to a client connection session and reused for the database activity. Once the client session is closed, the
physical connection is put back into cache for subsequent use. This implementation contrasts to the basic DataSource
object implementation, where a one-to-one correspondence exists between client Connection object and the physical
database connection.
Your applications can use connection pooling in the following ways:
Connection Pooling by an Application Server
Connection Pooling Using the Basic DataSource API
Connection Pooling with the DriverManager Class
Connection Pooling by an Application Server
Usually, in a three-tier environment, the application server implements the connection pooling component. How to
implement this component is described in these topics:
Guidelines for Implementing an Application Server to Use Connection Pooling
Standard ConnectionPoolDataSource Object Properties