This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes How do you handle Hibernate in Enterprise environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How do you handle Hibernate in Enterprise environment" Watch "How do you handle Hibernate in Enterprise environment" New topic
Author

How do you handle Hibernate in Enterprise environment

VenkataPrasad Regula
Ranch Hand

Joined: Jun 30, 2011
Posts: 63
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

Joined: Oct 16, 2009
Posts: 66

May be this can be a starting point: http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/session-configuration.html#configuration-j2ee


Googling doesn't make you a genius. But not Googling makes you dumber.
 
 
subject: How do you handle Hibernate in Enterprise environment
 
Similar Threads
illegalStateException after invalidating Session
EJB References question/ why this answer?
Question from ejbcertificate.com
Mock Exam Question(Repost)
[Newb] How to reuse attributes