This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes What is the need for Integrating Spring and Hibernate ? 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 "What is the need for Integrating Spring and Hibernate ?" Watch "What is the need for Integrating Spring and Hibernate ?" New topic
Author

What is the need for Integrating Spring and Hibernate ?

RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528

Hello ,

I am using Spring EJB and Hibernate in the application .

I can find only one use of integrating Hibernate and Spring

Instead of scattering the code across the application for getting reference to the Session from the SessionFactory , we can directly use the HibernateTemplate which is configured on to the XML files.

Is this the only advantage or any other reasons also .

Please specify.


If you want something you never had do something which you had never done
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

When I use Spring and JPA/Hibernate I only use Spring to inject a session into my DAOs (without using the JpaTemplate) and transaction support. For me, Spring brings no other benefit directly to JPA/Hibernate. With EJBs it might be different, I don't really know.


GenRocket - Experts at Building Test Data
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Hi Gregg ,

In your case that is fine .


Any ideas to share from anybody when using with EJB??
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is the need for Integrating Spring and Hibernate ?
 
Similar Threads
HIbernate 3 + Tomcat 5.5.7 + JOTM
How to save and delete the List<Object> by HibernateTemplate?..
Integration problem struts 2.0.11.2 - spring 2.5.5
Portlets with Hibernate
integarting JSF with hibernate and spring