• 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

what is the difference between HttpSession and Hibernate Session?

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also please give the links if we have some good articles especially which suggests the differences .Thanks.
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sasank manohar wrote:Also please give the links if we have some good articles especially which suggests the differences .Thanks.



A HttpSession created when you log onto a servlet base web application, it is your user session while you are in the application. The HttpSession exists as long as you are logged onto the application. A Hibernate session is created by Hibernate when you use Hibernate to read and/or write objects to a database. The Hibernate session exist only for the duration of a transaction. If you ask Hibernate for several sessions during a single transaction it will (should) give you the same session. If you ask Hibernate for a session in two different transactions it will (should) give you two different sessions. While you are log into an application with a single HttpSession you may perform many actions that result in Hibernate creating many many session.

Of course the above assumes the application was build using both Servlets and Hibernate.

Hope that makes sense.
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ran that makes a lot of sense for me. thanks a lot.
 
grapes are vegan food pellets. Eat this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic