I've fixed it. The project now works with openjpa, eclipselink, hibernate 4.2.x and hibernate 4.3.x. The stable versions of openejb and tomee don't work with hibernate 4.3.x. Therefore the snapshot version is required.
Updated code here:
https://github.com/Crydust/guestbooktwo