aspose file tools
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
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Transactions with Spring and Hibernate" Watch "Transactions with Spring and Hibernate" New topic

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.

jQuery in Action, 2nd edition
subject: Transactions with Spring and Hibernate