I am new to Hibernate and I\'m not sure whether to use a Hibernate SessionFactory or a JPA EntityManagerFactory to create a Hibernate Session
SessionFactory
EntityManagerFactory
Session
I want to add on this that you can also get Hibernate's session by calling getDelegate() method from EntityManager.
getDelegate()
EntityManager
ex:
Session session = (Session) entityManager.getDelegate();