• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate from persistence layer design

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate is a persistence layer, and EJB is too. Anybody could give me some infomation ,

1. How does hibernate achieve the persistence layer function ?
2. Why the hibernate is a better design of persistence layer ?

I want to know about hibernate just from persistence layer design. Any web link is welcome.

Thanks
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The short answer would be that hibernate allows you to save regular Java Objects with very minor requirments. EJB's require you to conform your Java Objects to subclass their classes and work within their framework.

Basically hibernate works for you and EJB's make you work for them.
 
Pj Murray
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Edward Chen:


I want to know about hibernate just from persistence layer design. Any web link is welcome.

Thanks


Hello Edward,

You may find it useful to take a look at this blog entry to see where Hibernate fits in as a persistence strategy.

Choosing a Java Persistence Strategy


http://www.codefutures.com/weblog/andygrove/archives/2005/01/choosing_a_java.html


Regards
PJ Murray
CodeFutures Software
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also note that the EJB specification is much more than persistence. In fact, I'd say the persistence aspect of EJBs (entity beans) is the last part you should use of EJB, and absolutely never without the other parts (session beans).

There are replacements for the other aspects of EJBs like the Spring Framework and lightweight containers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic