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.