0

I was trying to code with JPA and got confused with the placement of the EntityManagerFactory interface. It seems to belongs to JPA but placed in jpa-hibernate jar.

If this is the case, I think the same should be copied to all ORM implementations. It is the way it is designed? Do we have a JPA level jar which holds these interfaces?

I am clear with the difference between JPA and hibernate classes. Would like to know why EntityManagerFactory interface is placed inside hibernate related jar file.

Jomy
  • 23
  • 6
  • Possible duplicate of [Hibernate SessionFactory vs. EntityManagerFactory](https://stackoverflow.com/questions/5640778/hibernate-sessionfactory-vs-entitymanagerfactory) – Steephen May 30 '19 at 04:21
  • I am clear with the difference between JPA and hibernate classes. Don't is why JPA interface is placed inside hibernate related jar file – Jomy May 30 '19 at 04:37
  • 1
    What is `jpa-hibernate.jar`? Where does it come from? Is it part of the distribution of your runtime environment? There is no artifact named `jpa-hibernate` in the Maven central. Both `hibernate-core` and `hibernate-entitymanager` depend on `javax.persistence:javax.persistence-api`, there is no `jpa-hibernate` involved – crizzis May 30 '19 at 13:30

0 Answers0