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
Using EntityManagerFactory approach allows us to use callback method annotations like @PrePersist, @PostPersist,@PreUpdate with no extra configuration.
Using similar callbacks while using SessionFactory will require extra efforts.
Related Hibernate docs can be found here and here.
Related SOF Question and Spring Forum discussion