0

When we write java code we use JPA interfaces as its a java specification So we generally avoid using the third party implementation in Java code.

Please verify this statement JPA is the specification, Hibernate and EJB 3.0 is the implementation.

Please correct me if this is wrong and please help me to understand this.

Azzabi Haythem
  • 2,318
  • 7
  • 26
  • 32
Sunny Gupta
  • 6,929
  • 15
  • 52
  • 80

2 Answers2

0

Yes, Hibernate implements the JPA standard. EJB however is itself a standard.

I'm not an expert, either. The Wikipedia says, that EJB includes JPA as a requirement that an application server must implement to provide EJB. An application server can use Hibernate "under the hood" to implement JPA.

migu
  • 1,371
  • 1
  • 14
  • 23
0

Hibernate implements the JPA specification entirely. You do not need any part of the EJB 3.0 library. I would say the correct statement is:

JPA is the specification, hibernate is the implementation.

Pace
  • 41,875
  • 13
  • 113
  • 156
  • There are several other libraries that implement JPA also. See http://stackoverflow.com/questions/576659/jpa-implementations-which-one-is-the-best-to-use – Jonathan Jan 23 '12 at 15:05