Chapter 2 of which book? If you mean "Hibernate In Action", then the source code is printed in the book. If you mean another book then I can't help. [ April 01, 2005: Message edited by: Paul Sturrock ]
Ah, so you do mean Hibernate In Action. True the source code is not 100% there, but all that you need to know about Hibernate to run this example is. You have:
Message - your persistent class
Message.hbm.xml - the mapping file for that class
A snippet of code showing you how to open a Session and query for a Message
A snippet of code showing you how to update a Message
Further on in the chapter you have "Basic Configuration" which tells you how to configure your SessionFactory.
Which part of this is causing you problems? Perhaps you can post the code you have written so far and someone might be able to spot where you are going wrong. You could also say which part of this is not clear to you and perhaps someone will take the time to explain it. [ April 01, 2005: Message edited by: Paul Sturrock ]