This is a set of samples for basic features of Hibernate covered in "Hibernate, how the magic is really done?".
Slides and video may be found here: http://jeeconf.com/program/hibernate-how-the-magic-is-really-done/.
You are free to use and distribute them as is if you promise to run tests and understand how things work under the hood. ;)
== TECHNICAL DETAILS ==
If you want to run tests you should add VM option: -Drun-tests=true.