File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate in EJB2 and EJB3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate in EJB2 and EJB3" Watch "Hibernate in EJB2 and EJB3" New topic

Hibernate in EJB2 and EJB3

Nagamalini Pampati

Joined: Oct 04, 2006
Posts: 20

I read that "Hibernate is used for persistence in EJB2 and in EJB3 we have JavaPersistence API for persistence" .. that means we cant use hibernate in ejb3... Is this true?Please help me out in this.

Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

You can use Hibernate with EJB3 if you like. There is no technical restriction.

(Its always useful to quote your sources when asking for an explanation. Taken out of context its hard to explain what the writer was aiming for. )

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10033

Hibernate actually implements from JPA. So when you work on Hibernate it means that you are already into JPA.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
I agree. Here's the link:
subject: Hibernate in EJB2 and EJB3
It's not a secret anymore!