A much better starting point for the code you are looking for is a 'seam-gen' produced skeleton. Check the reference documentation. The wiki example is actually a "real" application, with all the complications that brings.
Cannot open connection
You need to start the database server. Check the README.txt.
I was running the database as specified by the README... but it doesn't matter as seamgen was exactly what I was looking for. Thanks!