• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ProJPA2 book

 
Emmanuel Garcia
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I a newby with EJB3.0 but I have worked wiith Hibernate and its persistence API and I know Spring and I can see that Spring uses
persistence with Hibernate, Ibatiz or JPA.

My questions are, if you want to work with JPA ,Is it tied with EJB 3.0? Can I work with JPA without work with EJBs ?

I believe thath JPA is a API as such JDBC, only interfaces, the implementation can be with Hibernate or openJPA, Is it correct ?

Regards.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. There are implementations that having nothing to do with EJB or application servers
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fact that Spring offers integration with JPA is a good indicator that JPA works without EJB.

JPA was initially developed within the EJB 3.0 expert group and released as a separate document but as part of the EJB 3.0 spec (that is why the previous book was called "Pro EJB 3: Java Persistence API"). Although JPA could always be used independent of EJB, when JPA 2.0 work began it was as a completely separate expert group, making its independence from EJB more obvious. Think of it as a portable persistence API equivalent to Hibernate, but that has additional integration support built right into all of the existing Java EE components, plus Spring, Google App Engine, or any other popular Java container/framework.

Every popular persistence implementation implements it, with 3 major open source products among them: Hibernate, EclipseLink and OpenJPA. EclipseLink is the only one that is currently compliant with JPA 2.0, but the others will definitely follow. The key advantage of using JPA is that your application is not bound to a particular implementation because the JPA spec defines a way for the implementations to be transparently plugged in under the covers.
 
Emmanuel Garcia
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mike and thanks Jeanne Boyarsky for you comment.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic