• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

is hibernate a good replacement for entity beans

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello , i have knowledge of entity beans as well as i worked on hibernate.I want to know that whether hibernate will replace entity beans in all? If some one can tell me scenarios where entity beans to be used and where hibernate should be used.Replies will be highly appreciated.Thanks in advance.
 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Alok Bhandari:
Hello , i have knowledge of entity beans as well as i worked on hibernate.
.


You should be in a good position to tell; when to use EB and when to use hibernate.


I want to know that whether hibernate will replace entity beans in all?
.


No Hibernate will not replace entity beans. Both have some specific qualities.


If some one can tell me scenarios where entity beans to be used and where hibernate should be used.Replies will be highly appreciated.Thanks in advance.


It depends on what kind of application you are building?
Companies who can invest in expensive Application servers can go the EJB3 way. They get all in one package - transaction management, scalibility, distributed nature, resource management, standarization etc.
You have to use additional packages or workaround to get similar features when using Hibernate.

If you compare just the ORM features, then Hibernate wins:
Hibernate is more agile, applicable for light weight runtime containers, easy, high performant.
EJB is heavyweight runtime environment, coupled with app servers, hard to test, hard to learn etc.

But EJB is much more than just ORM, it is a complete container.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


You should be in a good position to tell; when to use EB and when to use hibernate


Asside from the fact EJB3 does not include Entity Beans, do you have a situation where you would choose to use Entity Beans? I can't think of one where I would.


Companies who can invest in expensive Application servers can go the EJB3 way. They get all in one package - transaction management, scalibility, distributed nature, resource management, standarization etc.
You have to use additional packages or workaround to get similar features when using Hibernate.


Why not use Hibernate (or some othe ORM tool) accessed through a Session Facade? Isn't that the best of both worlds?
 
Rajah Nagur
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:

Why not use Hibernate (or some othe ORM tool) accessed through a Session Facade? Isn't that the best of both worlds?




It is best of the both worlds, but remember, Hibernate is opensource, has only one implementation, no guarantee or support. Only assurance is that you get the source code. Also in the above case, you have to rely on container to provide additional services like security, pooling etc.

Since the creator of Hibernate is also the lead of the EJB3 spec, I'm sure that EJB3 will have all the benefits of Hibernate (+Toplink+JDO).
There is no harm in trying out EJB3 and experimenting with it.

Entity beans in EJB 2.1 is a failed technology, have been banned from many companies. I'm sure, Sun and JCP would not make the same mistake twice.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hibernate is opensource, has only one implementation, no guarantee or support. Only assurance is that you get the source code.


This is not quite accurate. Hibernate is part of JBoss, so support is provided by RedHat (if you pay for it).
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No sane person would use 2.x EJB entity beans.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic