[英]How can i get method level transaction time out in ejb?
In my EJB application, I have set transaction time for a session out in weblogic-ejb-jar.xml
to 6000 seconds, but there is a method in this session bean for which I need only 60 seconds timeout. 在我的EJB应用程序中,我已将weblogic-ejb-jar.xml
会话的事务处理时间设置为6000秒,但是此会话bean中有一种方法,我只需要60秒的超时即可。
How can I get method level transaction timeout in EJB ? 如何在EJB中获得方法级事务超时?
You can set transaction time out in method level:- Use below code , Its will help you 您可以在方法级别设置事务超时:-使用以下代码,它将为您提供帮助
@AccessTimeout(value = 20, unit = TimeUnit.MINUTES)
@Override
public void myMethod() {
// Write your code here
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.