I am new to hibernate. i have read the road map and features of hibernate from hibernate.org. but i still want to know something. somebody told me that it is the replacement of entity beans. is it true?
so, could we go for hibernate instead of ejb. or again there is no relation.
if there is no relation how they are similar and talking about the same stuff. still confused. require more reading, i think. now i can say we can use hibernate and entity beans both together in an application right?
Hibernate have performance comparison stuff on their website - you can check it out here (if you think performance comparison stuff is in anyway reliable). What I can say is it performs better than Entity beans (caveat: in the context of the applications I have used it on).
Reliability? Yes Hibernate is reliable. Check out their site for a list of outstanding bugs.
Hibernate is (in general) easier to code than entity beans.
HQL is much more useful than EJBQL, and you can use native SQL easily.
CMP entity beans are restricted to a one-to-one relationship to ther underlying entities, Hibernate POJOs can span entities.
Entity beans tend to become bound to whichever platform you are using, because IBM, BEA et al have written useful extenstensions to fix the failings of Entity Beans which become difficult to avoid using. Hibernate is seperate from container, so its functionality is the same in whatever container you use it in (note: DB platform can still make a difference)
You have to use an EJB container with Entity Beans. This is not true of Hibernate (and most other similar ORMs)
Entity beans (in their current design) are being killed off by Sun - the new EJB3.0 spec. basically is Hibernate.
You can use Hibernate POJO's directly in the client tier. You can't use Entity Beans in the same way - you have to (typically) transfer their properties into value objects first.
Hibernate has been designed very specifically to support the features of a properly designed relational model. This is both a good thing and a bad thing. If you are in the position of designing your ER model, Hibernate's restrictions tends to stop you using ugly (or down right wrong) things you see in badly designed ER models (e.g. composite ids, conditional relationships, entites with no PK etc.) Of course, this can make it a little awkward to use with legacy ER models which do have features like this - but you can work round them in the context of Hibernate's archtecture.
And I've yet to see a production system which actually uses Entity Beans. (though I'd be interested in hearing if anyone else has used them in production)
Of course - a lot of this is just my personal opinion and others may very well disagree. I'd recommend you have a play around with Hibernate and Entity Beans. See which you prefer and get used to the features. [ October 13, 2004: Message edited by: Paul Sturrock ]