How to set a default query timeout with JPA and Hibernate?

JPA 2 defines the javax.persistence.query.timeout hint to specify default timeout in milliseconds. Hibernate 3.5 (currently still in beta) will support this hint.

See also https://hibernate.atlassian.net/browse/HHH-4662

Leave a Comment