AutoCommitTxn Execution Property
User level commands can execute multiple source commands. To control the transactional behavior of a user command when not in a local or global transaction, you can specify the AutoCommitTxn execution property.
Setting | Description |
---|---|
OFF |
Do not wrap each command in a transaction. Individual source commands may commit or rollback regardless of the success or failure of the overall command. |
ON |
Wrap each command in a transaction. This mode is the safest, but may introduce performance overhead. |
DETECT |
This is the default setting. Will automatically wrap commands in a transaction, but only if the command seems to be transactionally unsafe. |
The concept of command safety with respect to a transaction is determined by Teiid Spring Boot based upon command type, the transaction isolation level, and available metadata. A wrapping transaction is not needed if the following criteria are true:
-
The user command is fully pushed to the source.
-
The user command is a SELECT (including XML) and the transaction isolation is not REPEATABLE_READ nor SERIALIABLE.
-
The user command is a stored procedure, the transaction isolation is not REPEATABLE_READ nor SERIALIABLE, and the updating model count is zero. For more information, see Updating model count.
The update count may be set on all procedures as part of the procedure metadata in the model.