spring-framework / org.springframework.jdbc.datasource / LazyConnectionDataSourceProxy / setDefaultTransactionIsolation

setDefaultTransactionIsolation

open fun setDefaultTransactionIsolation(defaultTransactionIsolation: Int): Unit

Set the default transaction isolation level to expose when no target Connection has been fetched yet (-> actual JDBC Connection default not known yet).

This property accepts the int constant value (e.g. 8) as defined in the java.sql.Connection interface; it is mainly intended for programmatic use. Consider using the "defaultTransactionIsolationName" property for setting the value by name (e.g. "TRANSACTION_SERIALIZABLE").

If not specified, the default gets determined by checking a target Connection on startup. If that check fails, the default will be determined lazily on first access of a Connection.

See Also
#setDefaultTransactionIsolationNamejava.sql.Connection#setTransactionIsolation