JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.2.1 (H06.26+, J06.15+)
NOTE: This property can be set either through the java command line option or through the
property file of the Datasource.
Statement Level Atomicity
To maintain the database consistency, transactions must be controlled so that they either complete
successfully or are aborted. With the earlier release versions of JDBC/MX (prior to H10 AAB), the
transaction is automatically aborted on any error while performing an SQL statement.
This version of JDBC/MX driver follows up with the SQL/MX 3.0 or later versions Statement
Atomicity feature and guarantees that an individual SQL statement within a transaction either
completes successfully or has no effect on the database. When this statement level atomicity is
followed, with the auto commit mode set to false, any failure occurred during the Insert, Update,
or Delete operations will not abort the current transaction and this helps in execution of all the
statements under this current transaction until a commit or rollback is issued. This feature is optional
and can be enabled by setting the system property 'stmtatomicity'.
stmtatomicity property
Enabling the stmtatomicity property, allows the JDBC driver to set the transactions atomicity at
statement level.
This java property can be set from the command line as:
Djdbcmx.stmtatomicity={ON|OFF}
where
ON
statement level atomicity
OFF
transaction level atomicity. The default is set to OFF.
NOTE: This functionality is available in JDBC/MX T1275H10^AAB and later versions.
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 multi-threaded 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.
40 Accessing SQL Databases with SQL/MX










