• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do you handle Hibernate in Enterprise environment

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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()


 
Ranch Hand
Posts: 66
VI Editor Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic