spring-framework / org.springframework.jdbc.support.incrementer / MySQLMaxValueIncrementer / setUseNewConnection

setUseNewConnection

open fun setUseNewConnection(useNewConnection: Boolean): Unit

Set whether to use a new connection for the incrementer.

true is necessary to support transactional storage engines, using an isolated separate transaction for the increment operation. false is sufficient if the storage engine of the sequence table is non-transactional (like MYISAM), avoiding the effort of acquiring an extra Connection for the increment operation.

Default is true since Spring Framework 5.0.

Since
4.3.6

See Also
DataSource#getConnection()