Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction and non-transaction in Hibernate DAO

Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am developing web java application with help of Hibernate ,

To interact with DB , some cases I need only a single operation and in some cases I need a transaction (multiple operations)
currently I have the following DAO which works only for a single operation but it fails in case of transaction because am commiting the transaction in DAO

is there any way to modify the DAO code so that it can work in both cases (transation and non transaction cases) and what is the best way to do that so it suits all the cases.

Why fit in when you were born to stand out? - Seuss. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!