|
Re: Design Enterprise Applications with the EJB 3.0 Java Persistence API
|
Posted: Apr 2, 2006 4:30 PM
|
|
> What is the advantage of using EJB 3.0 over Hibernate? > What do we gain if some companies endorse a copy of > Hibernate as a standard? > Hibernate is a popular open-source project. Why should we > discard Hibernate for EJB 3.0? > EJBs is a complex beast. It still retains backward > compatibility. Why use it for new projects?
I think the tradeoffs are that EJB 3.0 is a standard with multiple implementations. Hibernate is a product from one vendor, albeit an open source product. I try to use standards wherever possible, so that in the future it will likely be cheaper to switch vendors if I so choose. You can use JBoss's implementation of EJB3, which is a thin layer on top of Hibernate, if you wish.
I think the downside of standards is that they move more slowly than non-standards, so if you want the latest innovation, you will probably have to go outside the standard spec.
We decided to use Hibernate for Artima's new architecture, and have continued to do so even though EJB3 looks quite nice. If the day comes that I want to replace it with JBOSS's or some other vendor's EJB3 implementation, then I'll have some rework to do. But we have done things like generate the persistence code from our own DSL and make sure only one package is actually coupled with Hibernate, which will make it cheaper to switch if we decide to do so at some point in the future.
|
|