It's not a secret anymore!*
The moose likes Other Application Frameworks and the fly likes Grouping oprations using HibernateDaoSupport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Grouping oprations using HibernateDaoSupport" Watch "Grouping oprations using HibernateDaoSupport" New topic
Author

Grouping oprations using HibernateDaoSupport

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

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

Joined: May 16, 2005
Posts: 513

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 ]

If you are not laughing at yourself, then you just didn't get the joke.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Grouping oprations using HibernateDaoSupport
 
Similar Threads
Doubt in Integrating Hibernate with Springframework
Spring Transactions with hibernate
How to configure Transaction in Spring and Hibernate Annotation?..
null pointer exception in spring with hibernate
NPE at getHibernateTemplate( )