【发布时间】:2014-10-26 17:26:00
【问题描述】:
我有一个无状态会话 bean,一个方法需要 6 分钟才能返回结果,因为我得到了“超时”异常。我注意到超时已经在 Wildfly Standalone.xml 或 persistence.xml 中设置了
<session-bean>
<stateful default-access-timeout="12000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>
<singleton default-access-timeout="12000"/>
</session-bean>
或
<property name="javax.persistence.query.timeout" value="120000" />
但它仅适用于有状态的 bean。如何将超时设置为无状态 bean 中的一种方法?
【问题讨论】:
标签: hibernate timeout ejb wildfly