Hi,
I am new to spring; why would one use an hibernatetemplate as
against directly making api calls to the hibernate session.
Thanks,
Kasi
Hi,
I am new to spring; why would one use an hibernatetemplate as
against directly making api calls to the hibernate session.
Thanks,
Kasi
To shorten code:why would one use an hibernatetemplate as
against directly making api calls to the hibernate session
- 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
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