- Adding the Hibernate libraries (jars) to the classpath
- Adding your JDBC driver to the classpath
- Creating Object mappings (.hbm.xml files) between your Beans and DB tables
- Configuring Hibernate to use your DB and mappings (hibernate.cfg.xml)
- Configure Log4J (optional - log4j.properties)
- Creating GWT services that will use Hibernate to access the DB (aService.java, aServiceAsync.java, aServiceImpl.java)

The stack identified as 'GWT Services' actually uses the GWT and Hibernate APIs in order to persist the objects. GWT is used to traffic the objects between server and GUI (RPC calls) and Hibernate is used to manage DB sessions, threading and ultimately generating the DB specific calls.
This is a very simplified DB model for the application that will be implemented for this first Hibernate attempt:
The idea behind it is that a 'Process Model' contains 'Process Disciplines' that at their turn contain 'Tasks'. There might be many Process Models but they won't share the disciplines. This basically means that if if we want to generate a new Process Model from a previously existing one, we just copy all the Disciplines and Tasks to the new. Any modifications made only affect the new Process Model, leaving the previous untouched.An Eclipse project using GWT and Hibernate should look similar to this (very ugly) image:

The items marked with an * are files that have to be changed/added when adding Hibernate to the project.
No comments:
Post a Comment