JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.2.1 (H06.26+, J06.15+)

You can also programmatically disable or enable nonblocking JDBC/MX by setting the
sqlmx_nowait property within the program. Depending on your application, set this property
as follows:
In JDBC/MX applications that obtain a JDBC connection by using the DriverManager class,
set this property before the JDBC/MX driver is loaded.
In JDBC/MX applications that obtain a JDBC connection by using JNDI API with the
DataSource interface, set this property before the DataSource object is created.
JDBC connection can now be simultaneously used from multiple threads. Multiple threads working
on SQL statements are allowed to share the same connection. Therefore, single connection context
is used across multiple threads and the operations associated with the connection object are made
thread safe.
If you are an application developer writing multi-threaded Java applications that use nonblocking
JDBC, follow these recommendations:
Create only one JDBC connection per thread. Applications obtaining multiple JDBC connections
in single thread do not run the SQL/MX operations concurrently and can waste system resources
because each connection requires its own SQL/MX compiler process.
Do not share JDBC Java objects--such as Statement or ResultSet objects--across threads
for purposes other than canceling the SQL operation with the Cancel()method.
Be aware of the non-preemptive nature of the thread implementation in NonStop Server for
Java 4. A CPU-bound thread runs to its completion without providing an opportunity for the
thread scheduler to schedule a different thread.
If an application is written to share connection across multiple threads, then the connection
properties should not be modified.
Setting Batch Processing for Prepared Statements
You can improve the performance of batch processing when using the
PreparedStatement.executeBatch() method by setting the batchBinding property.
When the batchBinding property is set, the statements are batched in the executeBatch()
operation.
When a JDBC application sets the batchBinding property, the JDBC/MX driver allocates
resources relative to the specified binding size.
To set the batchBinding size, specify the batchBinding property in the command line. The
syntax is:
-Djdbcmx.batchBinding=binding_size
where binding_size is a positive, signed, long integer that specifies the maximum
number of PreparedStatement.executeBatch() method statements that the
JDBC/MX driver can bind together for execution. The integer value can be in the
range of 0 to 2 gigabytes.
Considerations
The values allowed for binding_size can result in your application running out of memory.
Check that you set the binding_size to a size appropriate for the memory limits.
If the number of statements is greater than the binding size, the JDBC/MX driver breaks the
execution of statements into blocks whose sizes are based on the binding size.
Even if the JDBC application does not call for batch execution, setting the
jdbcmx.batchBinding property causes the allocation of database resources relative to
the specified binding size.
When the jdbcmx.batchBinding property is not set, the
PreparedStatement.executeBatch()method returns a row-count array that contains
Using Additional JDBC/MX Properties 41