Difference between @Transactional and @TransactionAttribute

倾然丶 夕夏残阳落幕 提交于 2019-12-23 09:53:15

问题


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.


回答1:


@TransactionAttribute is for EJB3 beans.

@Transactional is for POJOs (for example Seam, Spring/Hibernate).



来源:https://stackoverflow.com/questions/21453856/difference-between-transactional-and-transactionattribute

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