JDBC Driver for SQL/MX Programmer's Reference

Using Additional JDBC/MX Properties
You can use JDBC/MX properties for the following application features:
Managing Nonblocking JDBC/MX
Setting Batch Processing for Prepared Statements
Setting the reserveDataLocators Property
In addition to these topics, also see Enabling Tracing for Application Servers.
Managing Nonblocking JDBC/MX
Blocking mode with the JDBC/MX driver causes the whole JVM process to be blocked when an
SQL operation occurs. Nonblocking mode causes the JDBC/MX driver to block only the thread that
invokes the SQL operation and not the whole JVM process. In a multithreaded Java application, the
nonblocking JDBC/MX feature enables the JVM to schedule other threads concurrently while each
SQL operation is being done by a thread.
By default, JDBC/MX uses the nonblocking mode. You can disable nonblocking JDBC/MX in a
Java application by setting the sqlmx_nowait property to OFF by using the
-Djdbcmx.sqlmx_nowait option in the command line. The syntax is:
-Djdbcmx.sqlmx_nowait={ ON | OFF }
where
ON
specifies nonblocking JDBC/MX. The default is ON.
OFF
specifies process blocking JDBC/MX.
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.
If you are an application developer writing multithreaded 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 simultaneously use a JDBC connection from multiple threads.