I have opened a GitHub ticket to Spring team as a result to investigate a propertie that controls query timeout ([Spring Data query timeout · Issue #33866 · spring-projects/spring-boot (github.com)|https://github.com/spring-projects/spring-boot/issues/33866]).
After update to Hibernate 6 version propertie *jakarta.persistence.query.timeout* seems not work anymore. On previous version (Hibernate 5.6.14) propertie *javax.persistence.query.timeout* is successfully set and work as expected.
Looks like when
{noformat}org.hibernate.query.sqm.internal.QuerySqmImpl{noformat}
is created it has its own
{noformat}org.hibernate.query.internal.QueryOptionsImpl{noformat}
and method
{noformat}setTimeout{noformat}
is never called on that instance.
I have attached some debug screenshots (using Hibernate 6.1.6 version).
Propertie being set on
{noformat}org.hibernate.query.spi.AbstractCommonQueryContract{noformat}
!image-20230119-140915.png|width=1088,height=457!
!image-20230119-141028.png|width=1151,height=465!
Then propertie is successfully set on :
{noformat}org.hibernate.query.sqm.internal.QuerySqmImpl{noformat}
!image-20230119-141043.png|width=455,height=431!
Method
{noformat}org.hibernate.query.sqm.internal.QuerySqmImpl.getTimeout(){noformat}
returns null:
!image-20230119-141142.png|width=408,height=411!
MySQL database is being used, by the way.
Is there any additional configuration that must be set?
Couldn’t find anything on Hibernate documentation regarding it.
Let me know if you have any question. Thanks in advance. |
|