Results 1 to 2 of 2

Thread: Spring Transaction Management or Hibernate Transactions?

  1. #1

    Default Spring Transaction Management or Hibernate Transactions?

    Hello. I'm developing a web app using Spring MVC + Spring IoC + Hibernate.

    Should I use Hibernate's Transaction directly (i.e. beginTransaction and commit) or use Spring's Transaction Management?

    Is one better for single databases versus across tiers?

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    Should I use Hibernate's Transaction directly (i.e. beginTransaction and commit) or use Spring's Transaction Management?
    Using Spring to manage your transactions declaratively is probably more flexible. Spring just uses Hibernate Transactions underneath (but you can also easily scale upto JTA if needed).

    Is one better for single databases versus across tiers?
    Spring can handle distributed transactions as well (as can Hibernate). See the reference: Do you need an application server for transaction management?

Similar Threads

  1. Replies: 3
    Last Post: Aug 16th, 2007, 12:10 PM
  2. Replies: 2
    Last Post: Aug 31st, 2005, 12:37 PM
  3. Replies: 0
    Last Post: Jun 6th, 2005, 06:22 AM
  4. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  5. Transaction pb Hibernate/MySQL
    By syluser in forum Data
    Replies: 2
    Last Post: Aug 28th, 2004, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •