This post originated from an RSS feed registered with Java Buzz
by Dominic Da Silva.
Original Post: It's winter, time to Hibernate
Feed Title: dsuspense
Feed URL: http://tss9.serverconfig.com/suspended.page/
Feed Description: Java/J2EE, .NET, OpenSource, Orlando living, Trinidad stuff and of course the Dolphins!...
Well, at long last I decided to get my Struts apps integrated with Hibernate, and actually start using Hibernate for that matter.
I chose to use version 2.1 as it is just out.
My first reference to get things set up was the Hibernate Quickstart with Tomcat.
I then got info on Struts/Hibernate integrati
400
on from the HibernatePlugIn for Struts, and this post outlining getting the SessionFactory setup in JNDI with Tomcat.
I sucessfully tested my app, aquiring the SessionFactory from the JNDI via a Servlet and also via the HibernatePlugIn.
Thanks to some good old code inspection of AppFuse (thanks Matt) and PersonalBlog (thanks Neil) I was able to see how they did their Struts/Hibernate/Tomcat integration as well.
All in all it the Struts/Hibernate integration seemed painless to setup, comparable to setting up
400
Struts and JDO.
The actual persistence mapping however seemed more intuitive with Hibernate than with JDO, plus no need for class enhancement.
I have to work with both more to really get a feel for each's strengths and weaknesses, but for now I will work with Hibernate and wait till JDO moves to a 2.0 state.