本文介绍了@Transactional和@TransactionAttribute之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始进行持久性编码,并且遇到了诸如@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之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 09:31