The Artima Developer Community
Sponsored Link

Java Community News
Design Enterprise Applications with the EJB 3.0 Java Persistence API

2 replies on 1 page. Most recent reply: Apr 2, 2006 7:30 PM by Bill Venners

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Bill Venners

Posts: 2251
Nickname: bv
Registered: Jan, 2002

Design Enterprise Applications with the EJB 3.0 Java Persistence API Posted: Mar 31, 2006 10:40 AM
Reply to this message Reply
Summary
This developerWorks article presents a design approach that leverages EJB 3.0's new Java Persistence API (JPA). JPA provides a standard object-relational mapping solution that bypasses the need to rely on third-party frameworks such as Hibernate.
Advertisement

Read it here:

http://www-128.ibm.com/developerworks/java/library/j-ejb3jpa.html

What's your opinion of EJB 3.0?


Vijay Nathani

Posts: 29
Nickname: vijaynath
Registered: Jan, 2006

Re: Design Enterprise Applications with the EJB 3.0 Java Persistence API Posted: Apr 2, 2006 3:39 PM
Reply to this message Reply
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?

Bill Venners

Posts: 2251
Nickname: bv
Registered: Jan, 2002

Re: Design Enterprise Applications with the EJB 3.0 Java Persistence API Posted: Apr 2, 2006 7:30 PM
Reply to this message Reply
> 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.

Flat View: This topic has 2 replies on 1 page
Topic: Design Enterprise Applications with the EJB 3.0 Java Persistence API Previous Topic   Next Topic Topic: When GC is Not Enough: Resource Management in Java


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us