• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need some help to Start up with Hibernate

 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i`d like to try hibernate in a EJB application.

Basically i`d like to use a Session Fa�ade -> Hibernate Stuff, in place of
Session Fa�ade -> CMPs, wich is what i`ve been doing till now.

So, can anyone sugest me a tutorial on doing the above described for me to start up?

Thanks,
ltcmelo
 
Bhagvan Kommadi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

You can look at the 10.1 section of documentation which comes with hibernate.

The snippet from the documentation

In a stateless session bean, a similar approach could be used. The bean would obtain a SessionFactory in setSessionContext(). Then each business method would create a Session, flush() it and close() it. Of course, the application should not commit() the connection. (Leave that to JTA, the database connection participates automatically in container-managed transactions.)

Bhagvan K
http://www.architectcorner.com
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple Startup with Hibernate
http://www.hibernate.org/82.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic