Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do you handle Hibernate in Enterprise environment

 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In any Hibernate tutorial we find the following steps

1. Create a Session Factory
2. Create a session
3. Do the unit of work
4. Close the session.

In an enterprise environment, we have the following issues as
1. How to create the session for different pages
2. If the page has multiple tasks to be done on a single page
3. If the result is returned to a page we return the POJO, which indicates the session will still be open. How to close the session
4. If the session is closed before return we cant return to the results page as the whole conversation gets closed by session.close()


 
Prabaharan Gopalan
Ranch Hand
Posts: 66
Java Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be this can be a starting point: http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/session-configuration.html#configuration-j2ee
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic