0

Where I can define the timeout for queries within hibernate in WildFly environment, is it the persistence.xml? And what is the default value?

<persistence>
    <persistence-unit name="my-pu">
        <properties>            
            <property name="javax.persistence.lock.timeout" value="2000"/>
            <property name="javax.persistence.query.timeout" value="2000"/>
        </properties>
    </persistence-unit>
</persistence>
DB2fan
  • 23
  • 3

1 Answers1

0

Not sure what you want to achieve exactly, but I think it might be best to configure a statement timeout or transaction timeout for the database user instead. Having said that, configuring this in the persistence.xml should work fine.

Christian Beikov
  • 15,141
  • 2
  • 32
  • 58