• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between hibernate and entity beans?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think entity beans also like ORM. then why ORM tools like hibernate better than entity beans?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well before EJB3, which isn't final yet. Entity Beans did not map well to relational databases. The different types of relationships that you can have in a database did not match up well. ORM tools also provide better integration with specific database bases, whereas Entity Beans were abstracted out too far to greatly enhance their speed with RDBMS specific tuning capabilities.

ORM tools also tend to be easier to work with than the complexities of EJB Entity Beans.

Now, with that said, I think in EJB3 you will find out that there won't be a difference. Hopefully.

Mark
 
Ranch Hand
Posts: 293
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With EJB 2.x entity beans, you are forced to implement certain interfaces and the EJB framework is quite pervasive upon your objects. You can't have "clean" objects and this somewhat limits your design choices when designing your objects. Also, because of this, its quite hard to test your objets outside of their container.

With Hibernate you do not have this problem as there are no specific interfaces you must implement and you do not have to extend any Hibernate specific classes. You can therefor have a "cleaner" design to your objects and can test them a lot easier as they can be tested both inside and outside their container.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic