Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3 and Hibernate  RSS feed

 
VijayKumar Sivagnanam
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How the EJB3 and Hibernate will co-exist? What is the significance of JPA (Java Persistance API) ?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the significance of JPA (Java Persistance API) ?


JPA is a specification (and Hibernate is an implementation of that spec). Earlier before the JPA spec there were tools which still did the same thing but there was no standard spec for those.

How the EJB3 and Hibernate will co-exist?


JBoss uses Hibernate for implementing the EJB3 specs.
 
Debu Panda
author
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note EJB 3 ExpertGroup produced two specifications: Core Contracts for Components (Session beans and MDBs) and Java Persistence API (Entities). Hibernate implements the JPA spec.

We explain these nicely in our first chapter that is available for free http://www.manning.com/panda/panda_meapch1.pdf.

With Hibernate 3, you will not have to use their proprietary session API, O-R mapping and query expression. You have the option to use EJB 3 JPA specific API (EntityManager), O-R mapping (annotations or XML) and query language (JPQL). This will allow you to switch your persistence provider to something else e.g. BEA Kodo (or OpenJPA) or TopLink if you are not happy with Hibernate for some reasons

regards
Debu
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!