• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Session maintenance in Hibernate

 
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

How can we maintain a session in hibernate?

Thanks.
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might be of some help: http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial-firstapp.html
Look at section: 1.2.5. - Startup and helpers
Here its show how a HibernateUtil can maintain the session.
 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Reehan Lalkhan wrote:This might be of some help: http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial-firstapp.html
Look at section: 1.2.5. - Startup and helpers
Here its show how a HibernateUtil can maintain the session.



Hi,

Thanks for replying. It just says how to get a SessionFactory instance right? I want to know how we can maintain a session in hibernate.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "maintain a Session"? Are you looking for a pattern to manage opening/closing sessions? If so, the transaction demarcated session stuff might be what you are looking for (see the documentation). Or are you looking for something such as the open session in view pattern? Or something else?
 
Happily living in the valley of the dried frogs with a few tiny ads.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic