Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and EJB 3.0

 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron,
How are hibernate and ejb 3.0 related?
How do they overlap (or not)?
When would you choose one over the other?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB provides an object relational mapping mechanism that uses JPA. Many people think Hibernate is based on EJB 3.0, or EJB 3.0 is based on Hibernate, which isn't true, although both technologies pull from many of the lessons learned over the past 5 or 6 years in the industry, and as such, they share a great many similarities.

I like the fact that Hibernate does not need an EJB container to run. This is especially helpful for my WebSphere clients that don't have access to an full version WebSphere EJB 3.0 server. This is always a big concern for clients.

-Cameron McKenzie
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't want to barge in on Cameron's parade (sorry, Cameron!), but I just need to clarify Cameron's answer, because I think it was a little misleading (unintentionally, I'm sure).

JPA doesn't need an EJB container any more than Hibernate does (although if you do have a container then JPA is much easier to use than the Hibernate API).

Cameron is quite correct that EJB 3.0 (the JPA part of it) was based on many products and technologies, including but not limited to Hibernate.
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is Hibernate annotations more advanced(more capabilities) than EJB 3.0annotations?
I know Hibernate annotations are based on EJB 3 annotations.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate Annotations does offer some annotation "extensions" (for lack of a better description) that are Hibernate specific, and not part of the EJB 3.0 persistence specification.
[ June 04, 2008: Message edited by: Jelle Klap ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jelle Klap:
Hibernate Annotations does offer some annotation "extensions" (for lack of a better description) that are Hibernate specific, and not part of the EJB 3.0 persistence specification.

[ June 04, 2008: Message edited by: Jelle Klap ]


So what are those annotations ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic