Nav
Nav

Reputation: 4540

How to find the version of JPA?

How to understand What JPA version I'm using in EJB? Is JPA built-in EJB?

Regards

Upvotes: 16

Views: 21340

Answers (2)

toxicatedblood
toxicatedblood

Reputation: 1

No JPA and EJBs are not related at all, they are totally independent. JPA is not built in EJBs. The javaee-api 6 which is the JAVA EE 6 container gives you the code for EJB 3 and JPA 2.+. In order to implement EJB3 you can use weblogic or JBoss or any application container. To implement JPA you can use hibernate, OpenJPA etc.

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>6.0</version>
</dependency>

Upvotes: 0

Pascal Thivent
Pascal Thivent

Reputation: 570385

With a Java EE 5 container, you get JPA 1.0 (specified in the JSR 220 - Enterprise JavaBeans, Version 3.0).

With a Java EE 6 container, you get JPA 2.0 (specified in the JSR 317: Java Persistence 2.0 which is now dedicated).

And if you are providing your own JPA implementation, well, it depends on the implementation and the version you provide :)

Here are some JPA 2.0 implementations and their respective versions:

  • EclipseLink 2.0+
  • Hibernate EntityManager 3.5+
  • OpenJPA 2.0+
  • DataNucleus 2.1.0+

Upvotes: 17

Related Questions