Autocommit
JDBC applications can use the autocommit property of a JDBC connection.
The autocommit property causes a commit after each update to Db2®. When using type 2
connectivity, this commit is a CICS® commit, and results in
the whole unit of work being committed.
Using the autocommit property also causes a commit to be taken when a connection
is closed. The use of autocommit with type 2 connectivity is not recommended.
Autocommit behaves as follows in the different JDBC environments supported in CICS.
- Liberty DataSource with type 2 connectivity:
autocommitis not supported. - Liberty DataSource with type 4 connectivity:
autocommitis supported and the default istrue. - CICS DataSource using the
cicsts:jdbc-1.0feature:autocommitis supported and the default isfalse. DriverManagerwith type 2 connectivity:autocommitis supported and the default isfalse.