This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Transactions with Spring and Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "Transactions with Spring and Hibernate" Watch "Transactions with Spring and Hibernate" New topic
Author

Transactions with Spring and Hibernate

Jim Baker
Ranch Hand

Joined: Mar 10, 2002
Posts: 177
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

Joined: Jan 06, 2007
Posts: 73
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.

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Transactions with Spring and Hibernate
 
Similar Threads
Learning Hibernate & Spring
transaction management
Hibernate transaction with Spring
Hibernate transaction with Spring
JTA Transaction