Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grouping oprations using HibernateDaoSupport

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I'm using Spring's HibernateDaoSupport in my application.
If I want to group some operation together like this (inside a single transaction):

How to code this method using HibernateDaoSupport ?

So, if my application uses declerative Spring transaction management (and sets the propagation behavior), every thing will be Ok ? or I have to provide my class with PlatformTransactionManager?
Thanks.
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use Spring's declarative transaction management. Works fine for me.

See sample Code.


you can in fact replace the * with your method name, say "placeOrder" if you want to have transactions wrapped only for calls made within that method.
[ June 04, 2006: Message edited by: Arun Kumarr ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic