wood burning stoves 2.0*
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
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??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the need for Integrating Spring and Hibernate ?