Results 1 to 3 of 3

Thread: advantages of using hibernatetemplate

  1. #1
    Join Date
    May 2005
    Posts
    1

    Default advantages of using hibernatetemplate

    Hi,

    I am new to spring; why would one use an hibernatetemplate as
    against directly making api calls to the hibernate session.

    Thanks,

    Kasi

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

    Default

    why would one use an hibernatetemplate as
    against directly making api calls to the hibernate session
    To shorten code:
    - no forced checked exception handling
    - automatic (and proper) retrieval of the session and cleanup
    To convert exceptions to a common data access exception hierarchy
    To implicitly participate (possibly with JDBC) in transactions

  3. #3
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Also, using HibernateCallback through HibernateTemplate you can make calls directly to the session w/o the checked exceptions.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Similar Threads

  1. HibernateTemplate and transactions
    By Simon Brunning in forum Data
    Replies: 4
    Last Post: Mar 9th, 2009, 12:37 AM
  2. Context initialization failed
    By kanonmicke in forum Container
    Replies: 7
    Last Post: Sep 29th, 2005, 12:35 AM
  3. Inject HibernateTemplate into DAO
    By foamdino in forum Data
    Replies: 5
    Last Post: Jul 6th, 2005, 06:56 AM
  4. Replies: 0
    Last Post: May 19th, 2005, 04:10 PM
  5. Replies: 0
    Last Post: May 18th, 2005, 10:04 AM

Posting Permissions

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