Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate with EJB

 
Wayne Kidd
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a common pattern for using Hibernate in J2EE containers.
 
Rickard Sundin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to look into JNDI-bound SessionFactory.
http://www.hibernate.org/hib_docs/reference/en/html/session-configuration.html#configuration-optional-jndi

/Rickard
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resource
Simple startup for EJBs with Hibernate
 
Siripa Siangklom
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check Hibernate + J2EE out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic