Reputation: 2068
As best practice, when using hibernate and spring together which transaction management should I use, Spring's transaction management or Hibernate's transaction management? I understand that both provides transaction management but since they are usually used together I dont know which to use. Does it depend on the situation or type of transaction to be handled or is there a rule of thumb when using these frameworks together?
Upvotes: 3
Views: 2118
Reputation: 18861
Spring is supposed to help you use Hibernate's transaction management - it's additional level of abstraction that simply works:) It is much more convenient marking which parts should be transactional (therefore handled by Spring).
Edit: Oh I almost forgot. With Spring's transactional support you will write LESS code ;)
Upvotes: 5