Upgrade to hibernate 4