• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's is Hibernate Session's lifecycle?

 
Silvio Esser
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know the session is cached by default. What happens when same query is issued from multiple users at the same time?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each query will go in a separate transaction, most likely in a separate session. The sessions have a very short lifecycle. Quite often, only lasting for the duration of the request-response cycle.

-Cameron McKenzie
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Silvio Esser wrote:I know the session is cached by default. What happens when same query is issued from multiple users at the same time?


I guess you could say it all depends on your transaction isolation level.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic