buildSessionFactory with serviceRegistry