-1

I'm new in nHibernate and I need some pros help. I want to make nhibernate session for long life cycle asp/net web application and what is best solution cuz i don't want to make some mistakes that for example client got session open for too long. Any suggestions? I saw some options with stateless session but i dont know when to use normal session and when to use stateless can someone explain that?

Rippo
  • 20,457
  • 13
  • 68
  • 112
Endiss
  • 639
  • 2
  • 10
  • 23

1 Answers1

2

Here we have two questions and too be honest are going to be difficult to explain in detail. So in a nutshell:-

Question1 - Long life session management

I would recommend buying this book, as it goes into great detail showing you how to setup and use session management for small unit of works and long life sessions (that is sessions that stay open between page requests)

Question 2 - Stateless session.

These are generally used when you need to do lots of bulk operations such as inserting lots of data into your database. Stateless sessions don't track changes and consume less memory and are quicker. For normal CRUD don't use Stateless sessions.

Hope this helps.

Rippo
  • 20,457
  • 13
  • 68
  • 112