java - EJB SessionBean - @TransactionManagement 和@TransactionAttribute 的组合

标签 java ejb-3.0 ejb

我说的对吗,@TransactionManagement(TransactionManagementType.BEAN) 与 SessionBean 上的任何 @TransactionAttribute 设置的组合没有意义?

@Stateless
@TransactionManagement(TransactionManagementType.BEAN)
@TransactionAttribute([any possible value of TransactionAttributeType])
public class SomeSessionBean {
    ....
}

我在任何文档中都找不到这个。

最佳答案

http://download.oracle.com/javaee/6/api/javax/ejb/TransactionAttribute.html

The TransactionAttribute annotation specifies whether the container is to invoke a business method within a transaction context. The TransactionAttribute annotation can be used for session beans and message driven beans. It can only be specified if container managed transaction demarcation is used.

关于java - EJB SessionBean - @TransactionManagement 和@TransactionAttribute 的组合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4957266/

相关文章:

java - foreach 中的 Struts 2 URL 参数

java - 可运行对象上的关闭标志

spring - 如何有效测试事务的酸度(Java/Spring/EJB 或其他)

postgresql - 如何从 EJB3 扩展持久性上下文访问 @Lob 字段

ejb - 如何在 JBoss AS 7 中保护 RESTful 接口(interface)

java - JEE架构问题: Service can inject Service? 或者Service只能注入(inject)Dao?

java - Jboss 中的乱序消息

java.rmi.MarshalException

java - 解析 JSON 并转换为对象列表

java - (Java) 如何使用 Selenium 验证外部链接重定向?