use jpa entity manager instead of hibernate session factory