• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB3 Entity Beans or Hibernate 3.2

 
Kalvinder Kumar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new to Persistence. I want to use ORM in my project and i want to use JPA. As i am new, i am bit confused whether to use EJB3 entity beans or hibernate. I know both follow JPA. Can i use ejb3 entity beans following jpa without any need of hibernate or i need to use hibernate too. Someone told me that if i am using entity beans 3 still i have to use EntityManager implementation of JPA provided by Hibernate. please help.
 
Vinod K Singh
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate is an implementation of EJB3 persistence API. I would suggest to code to EJB3 API and use Hibernate as an underlying implementation.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kalvinder,

JPA is a persistence API, and Hibernate is just one implementaion of that API. You should definitely use JPA, but you do not need to use Hibernate. The vendor implementation that you use is up to you, and will depend upon your preference. I usually recommend TopLink Essentials to people that are starting out since a) it is the Reference Implementation and ships with the Sun Glassfish server b) it is the easiest one to install and get going c) it was created by Oracle and I work for Oracle :-). It is just a couple of jar files and can be downloaded from the Glassfish site here.
 
Rahul Ba
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think EJB3....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic