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: autocommit is not supported.
  • Liberty DataSource with type 4 connectivity: autocommit is supported and the default is true.
  • CICS DataSource using the cicsts:jdbc-1.0 feature: autocommit is supported and the default is false.
  • DriverManager with type 2 connectivity: autocommit is supported and the default is false.