Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between @Transactional and @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.

like image 676
SnS Avatar asked Jan 30 '14 10:01

SnS


1 Answers

@TransactionAttribute is for EJB3 beans.

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

like image 196
Lars Behnke Avatar answered Sep 18 '22 13:09

Lars Behnke