Closed
Description
In what version(s) of Spring Integration are you seeing this issue?
unreleased main
Describe the bug
In #8606 ttl
type moved to Duration
and is used with JdbcTemplate
, e.g.
Acquire fails silently with PostgreSQL and propagated back to:
and handled in the last clause:
catch (Exception e) {
this.delegate.unlock();
rethrowAsLockException(e);
}
with this exception:
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [UPDATE LOCK
SET CLIENT_ID=?, CREATED_DATE=?
WHERE REGION=? AND LOCK_KEY=? AND (CLIENT_ID=? OR CREATED_DATE<?)
]; nested exception is org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.time.Instant. Use setObject() with an explicit Types value to specify the type to use.
Expected behavior
Should acquire the lock with PostgreSQL.