This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
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://aspose.com/file-tools
 
subject: Transactions with Spring and Hibernate
 
jQuery in Action, 3rd edition