permaculture playing cards
The moose likes Object Relational Mapping and the fly likes Hibernate with EJB3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate with EJB3" Watch "Hibernate with EJB3" New topic

Hibernate with EJB3

Nikhil Jain
Ranch Hand

Joined: May 15, 2005
Posts: 385
Can hibernate be used with EJBs. I know that there is support for JPA. But can we use other ORM with EJB3.

SCJP 1.4, SCWCD 1.4, SCBCD 1.5
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749

Yes, to answer your first question, but I'll move this into Object Relationship Mapping tool anyway.

[OCA 8 Book] [Blog]
Marko Novakovic

Joined: Jul 13, 2008
Posts: 6
Of course it can be used.

Only you cannot use Criteria API and Session. At least i didn't manage to get it from EntityManager.getDelegate()

Here is part of my persistence.xml file..

<persistence-unit name="StockEmuTest-ejbPU" transaction-type="JTA">
<property name="" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
I agree. Here's the link:
subject: Hibernate with EJB3
It's not a secret anymore!