• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate made easy - JPA, Hibernate and EJB

 
raghu dubey
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron and everyone,

Have been reading many posts since yesterday, and some new doubts have emerged. (Please note that I am new to Hibernate/EJBs)

I used to think that EJB's are way lot powerful, and do not share much with Hibernate. But think I was wrong.

However, at a broader perspective is Hibernate capable of doing most of the work that EJB does (like 70% or more).

If yes probably Hibernate is the way to go for (and stop studying for SCBCD )

Does this book show scenarios where Hibernate does the work easily than EJD does it?

Thanks,
 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by raghu dubey:
...
I used to think that EJB's are way lot powerful, and do not share much with Hibernate...


EJB and Hibernate are for different purpose. EJB gives a sub-set of functionality that Hibernate provides but EJB has several other features that's out of Hibernate's area.
Originally posted by raghu dubey:
If yes probably Hibernate is the way to go for (and stop studying for SCBCD )


I think its the other way. We now have to study EJB and Hibernate also.
[ June 04, 2008: Message edited by: Reehan Lalkhan ]
 
Rodrigo Lopes
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB, more specifically JPA, is just an specification.
Hibernate implements this specification, and besides that, provides other features.
Keep studying for SCBCD, then study Hibernate a see how it achieves the JPA specs and what are the aditional features.
 
raghu dubey
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the advise.

Reehan I think you are right
 
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
However, at a broader perspective is Hibernate capable of doing most of the work that EJB does (like 70% or more).


Well, if 70% of your application is stateless session beans, then Hibernate really won't do too much for you. If 70% of your application is entity beans, well, Hiberante could probably provide much of the data persistence capabilities.

Hibernate, like EJBs, is a tool, and you always need to use the right tool for the job. Hibernate acceptance has grown significantly because people are finding that it provides a very easy mechanism for providing persistence management.

Companies often use EJBs, and then find that they are not using many of the features that EJBs provide, and thus switch to Hibernate and plain old JavaBeans. Others find JavaBeans and Hibernate don't provide them with everything they need, and then switch to a more EJB centric solution. It all depends upon the needs of the project.

Having said that, by knowing EJBs, AND knowing Hibernate, you'll be able to make those important types of decisions, and companies are willing to pay top dollar for people with those types of decision making skills.

Kindest regards,

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic