Hibernate timeout in WildFly

119 views Asked by At

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>
1

There are 1 answers

0
Christian Beikov On

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.