Forums Register Login

EJB3 vs Hibernate vs Toplink vs OpenJPA

+Pie Number of slices to send: Send
When people refer to EJB3 entity beans, are they refering to a particular implementation? Or does EJB3 entity bean refer to the JPA implementation such as Hibernate ?

I see a lot of posts which have the title "Hibernate vs EJB3" well, are they competing products, or??

Can someone explain this to me? Does EJB3 Entity compete with Hibernate?
or ??


Billy thanks you

+Pie Number of slices to send: Send
EJB3 entity beans mean JPA beans. As such, this is 'just' a specification of the API, behaviour, semantics. JPA by itself is not usable, it requires someone to implement the specification. Such implementations (called JPA providers) are: Oracle TopLink Essentials* (reference implementation of JPA1), Hibernate (JPA1 and JPA2 recently with HB 3.5), EclipseLink (JPA1 and reference implementation of JPA2, TopLink donated by Oracle to Eclipse). There are others. Different implementations are used in different application servers: Glassfish v2.1 uses TopLink Essentials, JBoss uses HIbernate, Glassfish v3 uses EclipseLink. The idea is that you write your application against interfaces on GF 3 and then you are able to deploy and use it in JBoss AS 6, for instance - this requires that you don't use any provider specific functionality. If you do, you would have to bundle the provider with your application or simply rewrite parts of the app for the new runtime.
When comparing EJB3 vs. Hibernate, people mean JPA vs. Hibernate native API. Hibernate native has much functionality that didn't make it to JPA (EclipseLink as well), so if you need it, you might consider 'jailbreaking' from JPA. All project that I was on started with JPA, and if necessary breaked out (but not often).

* TopLink and TopLink Essentials - TopLink was a product by Oracle (as such I think it was closed source, but I am not sure), TopLink Essentials was an Open Source subset of TopLink that restricted itself to only implement what JPA requires. TopLink was later donated to Eclipse and is now an Open Source product under the name EclipseLink, and serves as the reference implementation for JPA2. It is worth checking out.

Hopefully this clears some of your doubts.

Raf
Lookout! Runaway whale! Hide behind this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 9335 times.
Similar Threads
Hibernate Annotations
Question for Authors: Hibernate vs. EJB 3.0
Should I learn Hibernate or wait for EJB 3?
Pooling vs Instance Caches
EJB entity 3.0 vs Hibernate
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:04:15.