Sunday, May 8, 2011

Using JPA instead of Hibernate

In JPA, the names of the interfaces are different from Hibernate. Most of the developers of hibernate, worked for JPA as well. So logically they are quite similar. To look at some:
  • ORM's persistence context is called Session in Hibernate and in JPA it is called EntityManager. So Session <-> EntityManager
  • SessionFactory is called EntityManagerFactory

See benefits of JPA over hibernate for more.

No comments:

Post a Comment

Chitika