Monday, October 16, 2006

Simple Sample to use Spring, xDoclet and Hibernate

I just revision how to use Hibernate, you need to understand about the one-to-one, one-to-many, many-to-many before use the Hibernate. Hibernate is not very complicate but you don't use any tools to help develop the application with Hibernate, you will feel hard.
In my experience, I suggest to use Eclipse 3.1.x & JBoss IDE plugins to develop the Hibernate and Spring application.

I will provide the simple project. It demo how to create one-to-one, one-to-many, many-to-many.
You need to pay attention on :
  1. persistent classes xDoclect's Hibernate tag.
  2. Spring configuration xml file ( hibernate.xml) - datasource, hbm config, bean of spring
  3. xDoclet configuration. Project > right click > property > XDoclect configuration
Hope this example can give you idea to use Spring and Hibernate.
** Sample download**

Useful resource to futher study Hibernate.
- HibernateGossip

Any problem, please feel free to contact me:
mingkit@gmail.com

No comments: