【问题标题】:Hibernate timeout in WildFlyWildFly 中的休眠超时
【发布时间】:2022-11-07 19:03:59
【问题描述】:

我可以在 WildFly 环境中为休眠中的查询定义超时,是 persistence.xml 吗? 什么是默认值?

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

【问题讨论】:

    标签: hibernate wildfly persistence.xml


    【解决方案1】:

    不确定您要准确实现什么,但我认为最好为数据库用户配置语句超时或事务超时。话虽如此,在persistence.xml 中配置它应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 2017-05-18
      • 1970-01-01
      • 2012-03-31
      • 2018-11-05
      • 1970-01-01
      • 2010-12-29
      • 2012-05-28
      • 2015-10-15
      • 2012-01-06
      相关资源
      最近更新 更多