}
private OgmSession buildOgmSession(Session session) {
final SessionFactory sessionFactory = ( ( HibernateEntityManagerFactory ) hibernateEm.getEntityManagerFactory() )
.getSessionFactory();
final OgmSessionFactory ogmSessionFactory = new OgmSessionFactory( ( SessionFactoryImplementor ) sessionFactory );
return new OgmSession( ogmSessionFactory, (EventSource) session );
}