问题描述
我开始进行持久性编码,并且遇到了诸如@Transactional
和@TransactionAttribute
之类的注释.我了解这两个批注的基本功能,也可以在类级别和方法级别使用它们.我想更好地理解的是这两个注释之间的区别.任何帮助,将不胜感激.谢谢.
I started persistence coding and I came across annotations such as @Transactional
and @TransactionAttribute
. I understand the basic functionality of these two annotations and also that they can be used at both class level and at the method level. What I would like to understand better is the difference between these two annotations. Any help would be appreciated. Thanks.
推荐答案
@TransactionAttribute 适用于EJB3 bean.
@TransactionAttribute is for EJB3 beans.
@Transactional 用于POJO(例如,Seam,Spring/Hibernate).
@Transactional is for POJOs (for example Seam, Spring/Hibernate).
这篇关于@Transactional和@TransactionAttribute之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!