Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is advantage of hibernate in spring framework?

 
Riyaz Abdul Kareem
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Please add your views on hibernate and advantage of using it in spring applications...

Thanks in advance.

Regards,
Riyaz
 
Nick Williamson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's one example for you having your dao extend HibernateDaoSupport

...
/*
This will save my bean to the database (everything transactions ect is configured in the spring/hibernate config files.
*/
getHibernateTemplate.save(mybean);
...

For one you can wrap your services with transactions, and not have to code it.

You can inject your dao's right into your services.

There are probably a ton more reasons, but those are just a few off the top of my head.
 
Riyaz Abdul Kareem
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi nick,

Thanks for your response.
could you please suggest any materials with spring + hibernate.

any help will be appreciated.

Thanks,
riyaz
 
Nick Williamson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out springs documentation on hibernate on their website. It goes through setting it up and good examples.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic