update that works with hibernate 4.x and spring 3.x