This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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.

 
jQuery in Action, 2nd edition
 
subject: Transactions with Spring and Hibernate
 
Similar Threads
JTA Transaction
Hibernate transaction with Spring
Hibernate transaction with Spring
transaction management
Learning Hibernate & Spring