Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Hibernate statistics shows tons of empty sessions  RSS feed

 
John Adamskii
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I am using Hibernate 5 with Spring API.  Running Java 8 with apache tomcat9.  Mysql 5.x
I access objects using getSession().getCurrentSession(), and only have one spring session per request.  (happy to paste my struts action, but not sure if it would help).

I enabled stat logging, and it displays all the queries, and session statistics at the end. 
So I would see a bunch of queries and then this:


However, after this (session is ended), it also shows about 20-40 empty sessions like this:



Does anyone know if this is normal?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!