Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transactions with Spring and Hibernate

 
Jim Baker
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Hibernate3 with Spring2. Both Hibernate and Spring handles the
transaction, which should be used? Or both?

I'm currently using Hibernate transaction through a datasource. The Hibernate
DAO is injected in the service class through Spring.
 
Nick Williamson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how I would do it: have a base bean that all your services can extend your transaction service so your transactions are at the service level. I'd be interested to see another way of doing this.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic