What is annotation to override transaction timeout?

不羁的心 提交于 2020-01-04 02:34:06

问题


New to EE - trying to reconfigure Weblogic's default timeout of 30 seconds without having to write up a weblogic-ejb-jar.xml file. I've used only annotations now but the only thing that I have seen is in the DD here:

<transaction-descriptor>
<trans-timeout-seconds>1200</trans-timeout-seconds>
</transaction-descriptor>

Anyway to avoid have a descriptor file just for this?


回答1:


I feel weird answering my own question but someone at work found this annotation.

@ weblogic.javaee.TransactionTimeoutSeconds(1200)

It is Weblogic specific but in my case, it will do. For anyone else who needs it, here is the link: http://docs.oracle.com/cd/E24329_01/web.1211/e24972/annotations.htm#i1438354



来源:https://stackoverflow.com/questions/18085304/what-is-annotation-to-override-transaction-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!