簡體   English   中英

使用 wildfly CLI 可以增加應用程序級別的事務超時嗎?

[英]Using wildfly CLI can I increase the transaction timeout at application level?

我知道使用 CLI 界面我可以增加默認事務 tiemout /subsystem=transactions:write-attribute(name=default-timeout,value=500)

但是,我希望為我的部署的特定會話 bean 方法執行此操作。 這可以通過 CLI 實現嗎? 我使用 CMT。

您可以使用注釋配置事務超時:

@org.jboss.ejb3.annotation.TransactionTimeout(value=500, unit=TimeUnit.SECONDS)

它適用於方法和類型級別。

或者您切換到 BMT 並使用javax.transaction.TransactionManager#setTransactionTimeout(int)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM