Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I learn Hibernate or wait for EJB 3?

 
Poomrat Boonyawong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My experience with EJB 2 mostly is disappointment about performance. Hibernate should fix this performance issue for me, but that's when i have heard about EJB3 too.
What is difference in this 2 technology and should i start learning Hibernate now ?

ps. sorry for my english
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well my 2 cents is that since Gavin is a huge factor in EJB3 Entity Bean, you will find so many similarities that learning Hibernate can only help when EJB3 comes out, and Hibernate might be your EJB3 implementation.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Taken from JBoss's EJB3 Documentation webpage

Hibernate EntityManager Docs

JBoss EJB 3.0 is built on top of Hibernate 3.x. This gives in-depth knowledge of EJB3 Persistence and the Hibernate implementation. It will teach you how to run EJB3 Persistence out of the container


Doc Page I mentioned.

Mark
 
Patrick Peak
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will agree with Mark here. I don't think its an either/or decision.
 
Poomrat Boonyawong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm interesting
Thank you for your answer
 
Patrick Peak
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing I forgot to comment on is the performance issue. One of the main reason I started using Hibernate is that it has a huge # of options for tuning the database queries.

Hibernate Query Language (HQL) is much much much more expressive that EJB's query language (EJBQL), at least in EJB 2.x. With HQL you can do single row selects, outer joins, and all sorts of other tricks that EJB didn't let you do. I wrote more about the possiblies of tuning in an article for the serverside here http://www.theserverside.com/articles/article.tss?l=RailsHibernate

Admittly, this is a Hibernate vs. Ruby On Rails comparison. Rails has yet another ORM model, though very different than EJB.
[ August 24, 2005: Message edited by: Patrick Peak ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic