GH-3866: DefLockRepository: expose query setters (#8606)
Fixes https://github.com/spring-projects/spring-integration/issues/3866 Some RDBMS vendors (or their JDBC drivers) may just log the problem without throwing an exception. * Expose setters for UPDATE and INSERTS queries in the `DefaultLockRepository` to let end-user to modify them respectively, e.g. be able to add a PostgreSQL `ON CONFLICT DO NOTHING` hint. * Refactor `DefaultLockRepository` to `Instant` instead of `LocalDateTime` with zone offset. * Refactor `ttl` property to `Duration` type * Fix `dead-lock` typo to `deadlock`
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
|
||||
<bean id="lockClient" class="org.springframework.integration.jdbc.lock.DefaultLockRepository">
|
||||
<constructor-arg name="dataSource" ref="dataSource"/>
|
||||
<property name="insertQuery"
|
||||
value="INSERT INTO INT_LOCK (REGION, LOCK_KEY, CLIENT_ID, CREATED_DATE) VALUES (?, ?, ?, ?)"/>
|
||||
</bean>
|
||||
|
||||
<tx:annotation-driven/>
|
||||
|
||||
Reference in New Issue
Block a user