views:

26

answers:

1

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

Regards

+2  A: 

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+
Pascal Thivent
How can I find this standalone specification in JEE6?
Navid
@Navid I'm not sure this is what you're looking for but I added some links to the specs.
Pascal Thivent
Are Persistence Providers implementing JPA? if yes, so I can not use just JPA because it is just API, isn't it? and I have to use one of JPA 2.0 implementations ?
Navid
@Navid: Yes, persistence providers are providing JPA implementations. And yes, JPA is indeed just an API (like the whole Java EE platform) and you have to use an implementation.
Pascal Thivent
Tahnks for you answer, but would you please tell me the version of JDK in difference with JEE? or there is a relation between them?
Navid
@Navid: Sure, see [Correlation between JEE / J2EE to J2SE / JDK versions](http://stackoverflow.com/questions/2013958/correlation-between-jee-j2ee-to-j2se-jdk-versions/2015780#2015780).
Pascal Thivent