Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Object Relational Mapping and the fly likes Hibernate with EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate with EJB" Watch "Hibernate with EJB" New topic

Hibernate with EJB

Wayne Kidd

Joined: Aug 17, 2003
Posts: 7
Does anyone have a comment on the idea of using Hibernate to persist objects in an EJB environment. That is, let the EJB framework manage transactions (possibly cross-server) while data is persisted with Hibernate/
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
That is a common pattern for using Hibernate in J2EE containers.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Rickard Sundin

Joined: Mar 10, 2003
Posts: 16
You may want to look into JNDI-bound SessionFactory.

somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Simple startup for EJBs with Hibernate

Java Developer, Thailand
Siripa Siangklom
Ranch Hand

Joined: Jan 26, 2004
Posts: 79
Check Hibernate + J2EE out.
It is sorta covered in the JavaRanch Style Guide.
subject: Hibernate with EJB