Hibernate Based Web Service
This is my second pass at a Hibernate project. For this, I'm attempting to:
- Create a service that returns a HashTable of Route information, a single RouteType per entry.
- URL contains the tag name.
- Values returned is an XML representation of the HashTable that can then be used to retrieve individual routes (the key set).
Starting out with a Maven-based project using the codehaus.mojo archetype for webapp.
- Document the strategy for creating tables and mapping files from Annotated Java classes.
- Use the inheritance strategy of separate tables per subclass.
- Use the Route hierarchy as the test bed.
- Create an archtype that I can re-use in other projects.
- Decide which fields are mapped to the database (since the EncodedTrack is calculated outside of DB at this time). ''Marking up the BikeTrain class on the first pass.''
- Generate some DDL from the HBM.
- Copied much of the existing bkthn project using the Archetype Creation steps (mvn archtype:create, mvn install, then chose the local archtype when creating the new project)
- Copied in the POJO class I wanted to persist
- Cleaned up the hibernate.cfg.xml file (including setting the DB connection parameters)
- Added Annotations to the POJO class
- Added the class to the configuration.
- Setup the Eclipse tools to use the configuration: Hibernate Console Configuration
page revision: 11, last edited: 27 Dec 2011 10:43